I have a URL like so:
www.domain.com/thispage.asp?param1¶m2=test¶m3=airplanes
A couple questions:
Expectedly, I cannot access
Request.QueryString("param1")
, but I also cannot access anynull
keys. How do I get this value? The URI can't change unfortunately.When I iterate through the parameters for the keys, it shows I only have two:
param1¶m2
andparam3
. It's like the ampersand does not distinguish between parameters and so it sees that as one key. How can I get the values of the first two parameters? I don't want to use regex if I don't have to.
For the third parameter in this example, Request.QueryString("param3")
works as it should.
Many thanks in advance.
Edit: My question is different, I've read the other post linked and like I stated above, I can't access a null
key. Also, I have to use parenthesis to access the keys, not brackets. We are not using c#, so apologies if I tagged this incorrectly (I frankly don't know all the differences). Also, as stated, we cannot change the URI by adding a "=" or anything else - it will have multiple parameters, with one being just a plain value (or key, whatever it's called in this case).
One more thing I should add: When the URL is simply www.domain.com/thispage.asp?param1
, then Request.QueryString
is equal to "param1
"