Mike wrote:
> "Mike" <> wrote in message
> news:%...
>> Is it possible to loop round all querystring parameters in a web page
>> (i.e. access them without hardcoding them)?
>>
>> I want to do this because I have a page that has different
>> querystring variables passed into it depending on the content of the
>> calling page.
>
> P.S. That would be querystring variables with names like
>
> test_page.asp?var1=3&var2=2&var6=8&var9=6
>
> How do I access var1, var2, var6 and var9 without hard coding them?
The following works with all the Request collections (Form, ServerVariables,
Querystring):
dim key
for each key in Request.Querystring
Response.Write key & ": " & Request.Querystring(key) & "<BR>"
next
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
|