I have a page where I am looking up recipes form a database. Before executing my query, I'm trying to make sure the
== Method 1 ==
If Not IsNumeric(Request.Querystring("recipeID")) Then
This validation fails if the recipeID key is missing from the querystring. It doesn't redirect to the badURL.asp page. It continues on to my SQL cause it's expecting a value that isn't there.
== Method 2 ==
If Not (Request.Querystring("recipeID")) Then
I was hoping method 2 would make sure the key 'recipeID' was in the querystring, but it doesn't seem to be working. It redirects either way regardless.
Any suggestions on how to make sure a key value exists?