There's 2 ways that I use, depending on the circumstances: (this is C#)
1) If you just want to know if it exists:
if (Request.QueryString["xxxx"] != null)
{
// it exists
}
else
{
// it doesn't
}
2) If you want to do something with it during the same test:
int parameterValue = 0;
try
{
parameterValue = Convert.ToInt32(Request.QueryString["xxxx"]);
}
catch
{
// doesn't exist, or wasn't a number
}
"Adam Knight" <de*@brightidea.com.au> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Can some one tell me how on earth i find out whether a querystring
exists.
In classic asp I would do the following.
If(Request.QueryString("test").Count = 0) The Response.Write("QueryString
does not exist!")
Cheers,
Adam