Return to Snippet

Revision: 31979
at September 16, 2010 21:31 by daverussellr


Updated Code
if (!string.IsNullOrEmpty(Request.QueryString["somekey"]))
            //do some stuff
        }

Revision: 31978
at September 16, 2010 19:54 by daverussellr


Initial Code
if (Request.QueryString["somekey"] != "" && Request.QueryString["somekey"] != null) {
            //do some stuff
        }

Initial URL

                                

Initial Description
Ensures that the querystring key that you require exists before using it.

Initial Title
Check For Key in Querystring

Initial Tags

                                

Initial Language
C#