How to Retrieve parameter value and append it to a URL

Yes, your syntax is incorrect there. And you already have it in intID, so just re-use it

doc.Load("http://api.something.com/1.0/products.xml?q="& intID &"&CategoryId=163")

Alternatively, you can use String.format. Not sure on the exact VB syntax, but something like this:

doc.Load(String.Format("http://api.something.com/1.0/products.xml?q={0}&tdCategoryId={1}", intID, catId))

I hope this helps

1 Like