You can determine if there are any values ββin a QueryString by checking its quantity:
Request.QueryString.Count > 0;
This means that if you are trying to prevent a page error because you do not want to access a value that is not there, I recommend wrapping request packets in the page properties and returning safe values ββfrom the property.
As an example
// setting this as protected makes it available in markup protected string TaskName { get { return (string)Request.QueryString["VarName"] ?? String.Empty; } }
ahsteele
source share