The code below simply checks that the ID value passed in the Querystring isn't empty and is numeric. We use the Len function and IsNumeric VBscript functions to do this.
<%
If Len(Request.Querystring("ID"))>0 AND IsNumeric(Request.Querystring("ID"))
Then
'execute your code
End If
%>
You may think that using the LEN function isn't necessary but indeed it is. I ran a test and found that If ID is left out of the querystring and there is no value passed as in the URL below, isNumeric(request.querystring(ID)) would indeed return TRUE.
www.codefixer.com/index.asp
It's best therefore to do the double check that the querystring isn't
empty and also that it's value is numeric.
Get the best asp hosting provider from web-hosting-top.com and save up to 30%
Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.
