Jonathan Allen wrote:
If Request.Form("Name") = "" Then
Response.Redirect "error.asp"
End if
If the browser does a GET against this page, sometimes the
Response.Redirect doesn't happen. It is as if there is form data
being sent on a GET.
Since Request.Form("Name") is an OBJECT with properties other than string
values, I am never surprised to see "unexpected" behavior when comparing it
to a string. Alternatives to consider:
• If Request.Form("Name").Count = 0 Then...
• If Request.Form("Name").Item = "" Then...
• If Request.Form("Name").Item = "" And
Request.QueryString("Name").Item = "" Then...
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.