token
Jan 13th, 2005, 10:01 AM
I need some help.
I want to have some validation in my form, so that when a user submits the form it will alert them if they miss a required field.
I am aware of the RequiredFieldValidator, but that takes up space on my form, and pushes it all around making it look terrible.
I want to know what would be a better way of handling it but not too sure if any of these ideas will work, or how to implement properly.
Could i have code in the code-behind of the submit button that verifies each field and then have a Javascript alert box popup to tell them they have a missing field and then cancel the submit. If so how do I call the javascript from the code-behind.
Or should I just capture all missing fields, building a string which after if there are any errors, take them to another form displaying what errors were encountered on their submission, and get them to hit the 'back' button to go back to the form to correct their problems.
Thanks.
I want to have some validation in my form, so that when a user submits the form it will alert them if they miss a required field.
I am aware of the RequiredFieldValidator, but that takes up space on my form, and pushes it all around making it look terrible.
I want to know what would be a better way of handling it but not too sure if any of these ideas will work, or how to implement properly.
Could i have code in the code-behind of the submit button that verifies each field and then have a Javascript alert box popup to tell them they have a missing field and then cancel the submit. If so how do I call the javascript from the code-behind.
Or should I just capture all missing fields, building a string which after if there are any errors, take them to another form displaying what errors were encountered on their submission, and get them to hit the 'back' button to go back to the form to correct their problems.
Thanks.