I have a form that submit a query to an API. the parameter is passed correctly to the next page and I can print it as a test, but it is not passed to the API query
q='%"&Request.QueryString("id")&"%'
sometimes the result is just generic and does not include the query parameter. I can print it and the parameter is definitely passed to the page but it is just ignored or return an error: System.NullReferenceException: Object reference not set to an instance of an object. Any ideas on how to fix this? not sure if it is a formatting issue or the way the page is loaded. This requests the query parameter and displays it on the page as a test (correct value is returned)
Form page:
dim intID as String intID = Request.QueryString("id") Response.write(intID)
Result Page:
This is the Query Parameter section: Dim doc As New XmlDocument() doc.Load("http://api.tradedoubler.com/1.0/products.xml; q='%"&Request.QueryString("id")&"%';tdCategoryId=168;%20category=test?token=B17495243749DAC9660980F6FB98495928DDX123")
So when I use the browser - copy the link to the url with a parameter e.g. q=spain, I get the correct results but when embedded in the asp.net page, it doesn't work