if(Page.Request.QueryString["ParamName"] != null)
if(Page.Request.QueryString["ParamName"] == expectedResult)
//Do something spectacular
The above seems cludgey. Is there a more elegant/compact way of checking if a query string parameter is not null and if so – retrieving the value of it?
I thought first of offering
but quickly realized that with strings, comparing some string with null is fine, and will produce false, so really just using this will work: