I'm having some trouble with validating input from the user.
The forms I have are.
Pwd1 = Password
Pwd2 = Confirm Password
When the user click submit I need to loop through each of the forms and if any of them are empty I need to display the appropriate error message. I need to set these two item (Is_Error = True) and (ErrMsg = "Whatever")
Then what will need happen is:
If (IS_Empty = True) Then
'The loop through and display all the error messages
'Process the form.
Can anyone help?
You will have to do something like :
For the error message to be meaningful, you will have to name your form fields accordingly.
IS_Empty = False
For each x in Request.Form
if Request(x)="" Then
IS_Empty = True
ErrMsg = ErrMsg & x & " is blank <br>"
A message like "PW2 is blank" wont make much sense to the user.