D
Deepster
Hi Guys
Here is what I am doing ... Have a page default.asp which looks at the
url and checks for querystring's. if there are none passed goes to a
function. if there are particular querystrings passed goes to the
respective function.
Now there can be only 2 valid querystrings that can be passed and only
one at a time. How to do i check for querystrings that dont exist and
send them to error page?
for example I have QS(querystring) ID and State. only one can exist at
a time or none. if I pass QS country along with one of those two, it
still goes to that function. Can I look for querystring that shouldnt
be valid in my case and redirect them to error page?
Here is my code! thanks
***********************
If (Request.QueryString("ID") <> "") Then
If (Request.QueryString("State") <> "") Then
Response.Redirect("error.asp")
Else
rs__MMColParam = Request.QueryString("ID")
display()
End if
Else if (Request.QueryString("State") <> "") Then
statereq = Request.QueryString("State") 'statereq --- State requested
select case statereq
case "AL"
alreq()
case "AZ"
azreq()
case "CO"
coreq()
case "FL"
flreq()
case "IN"
inreq()
case "MI"
mireq()
case "OH"
ohreq()
case "OR"
orreq()
case "VA"
vareq()
case "WA"
wareq()
case "APTS"
aptsreq()
case else
Response.Redirect "error.asp"
end select
Else
normal()
End If
End If
Here is what I am doing ... Have a page default.asp which looks at the
url and checks for querystring's. if there are none passed goes to a
function. if there are particular querystrings passed goes to the
respective function.
Now there can be only 2 valid querystrings that can be passed and only
one at a time. How to do i check for querystrings that dont exist and
send them to error page?
for example I have QS(querystring) ID and State. only one can exist at
a time or none. if I pass QS country along with one of those two, it
still goes to that function. Can I look for querystring that shouldnt
be valid in my case and redirect them to error page?
Here is my code! thanks
***********************
If (Request.QueryString("ID") <> "") Then
If (Request.QueryString("State") <> "") Then
Response.Redirect("error.asp")
Else
rs__MMColParam = Request.QueryString("ID")
display()
End if
Else if (Request.QueryString("State") <> "") Then
statereq = Request.QueryString("State") 'statereq --- State requested
select case statereq
case "AL"
alreq()
case "AZ"
azreq()
case "CO"
coreq()
case "FL"
flreq()
case "IN"
inreq()
case "MI"
mireq()
case "OH"
ohreq()
case "OR"
orreq()
case "VA"
vareq()
case "WA"
wareq()
case "APTS"
aptsreq()
case else
Response.Redirect "error.asp"
end select
Else
normal()
End If
End If