how to carry an error message and pass it to the previous page
Posted on 2011-04-30
I am trying to validate my email form that has been written using html tag.
i.e. the form is saved in contact.html and
the validater and functinality that used to send out an email is saved in sendemail.asp page.
What I want is, when ever the user try to send out an email with out filling his/her first name or sencond name, I want my form to redrect back to contact.htm page with an error message telling them that one of the field is not filled our.
Is it possible to append an error message with the redirect function?
If so, how do I append a message?
If (Trim(First)="") Then validationOK=false
If (Trim(Last)="") Then validationOK=false
If (Trim(Company)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("contact_support.html" & EmailFrom)
'Response.Write "Please fill out the requered fields: <b>" & EmailForm & "</b>"
Thank you inadvance