Hi, i have a large registration page which has about 23 fields on it for the User to fill in. 20 are mandatory the rest optional. Most are TEXT, some are SELECT, some are CHECKBOXES. How can i check each of these form elements (using ASP only!) without writing out:
If Len(strUsername) = 0 Then
blah
End If
If Len(strpassword) = 0 Then
blah
End IF
If strPassword <> strVerifyPassword Then
blah
End If
..and so on...
I've used the For each item in Request.Form, but this returns the field in a very bizarre order and doesn't seem to handle the checkboxes. The registration page is submitted to a handler page, so if the user enters anything incorrectly i want to redirect them to the original page with the incorrect fields highlighted in red (i'll do this by re-directing and using the querystring - any other ways of doing this?)
Thanks
Arun
If Len(strUsername) = 0 Then
blah
End If
If Len(strpassword) = 0 Then
blah
End IF
If strPassword <> strVerifyPassword Then
blah
End If
..and so on...
I've used the For each item in Request.Form, but this returns the field in a very bizarre order and doesn't seem to handle the checkboxes. The registration page is submitted to a handler page, so if the user enters anything incorrectly i want to redirect them to the original page with the incorrect fields highlighted in red (i'll do this by re-directing and using the querystring - any other ways of doing this?)
Thanks
Arun