I have a simple web form called default.aspx in the folder structure webroot / folder /
When I go to http://myapp/folder/?key=value, the page returns a fine and when I call
<%= Request.QueryString[0] %>
I get http://myapp/folder/?key=valueon the page. However, if I call
<%= Request.QueryString["key"] %>
I get nothing and when I call
<%= Request.QueryString[1] %>
I get Index was out of range. Must be non-negative and less than the size of the collection.
This seems like a very trivial problem, but I can’t understand what is happening?
source
share