QueryString problem in .aspx - not outputting anything
I need to print the querystring value "? Type = xxx" inside my .aspx page, why doesn't this work:
<%= Request.QueryString("type") %>
While this does:
<%= Request.QueryString(0) %>
The first does not output anything, the second prints the value as expected, but that is not always the first value I want ...
Any ideas?
I redirect to "modrewrite.aspx" for 404 errors in the Custom Errors tab in IIS and then pick up the correct page based on what was asked for. However, it is strange that it works with an indexed and unnamed value ...
I managed to find a strange solution; If I put a dummy value first, then I can select the value as expected.
This works: "? Dummy = value & type = xxx" Now I can collect the value with <% = Request.QueryString ("type")%>
+2
a source to share
4 answers