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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top