To find if particular url variable exists?

  • Thread starter Thread starter Lauchlan M
  • Start date Start date
L

Lauchlan M

I'm retrieving url variable information uses the Request.QueryString object,
eg:

if (Request.QueryString.HasKeys())
key
{
lblMyResult.Text = Request.QueryString["myVar"];
}
else
{
lblMyResult.Text = "Var does not exist";
}

Request.QueryString.HasKeys() tells me if there are _any_ keys, how can I
find if one particular key exists (without cycling over all keys and
checking their names one by one)?

Thanks

Lauchlan M
 
Back
Top