Monday, May 23, 2005

ASP.NET The Validation Process

The following is a simplified description of the process that happens when a validation control is used on a page.
1. When a page containing validation controls is requested, the user's browser type and version is evaluated to determine if client-side validation routines should be used.
2. If the browser supports client-side validation, the page loads with the appropriate routines being called from the validation controls. This is handled through a JScript® include file.
3. When the user moves between controls on a client-side validated form after changing a control's value, the validation events for the control that lost the focus are fired and appropriate error messages (if any) are displayed.
4. If the user generates a form submit on a client-side validated form, the entire form is evaluated for any validation controls that are not valid. If even one control is not valid, the form will not be submitted.
5. When the form is posted back to the server through a postback event, it is evaluated for validity on the server. This occurs even if the form was already evaluated on the client.
6. If any of the validation controls are found to be invalid through the server-side check, the page is redisplayed with the appropriate error messages included.
7. If the form passes all validation on both the server and client, the page processing sequence continues with the event that triggered the postback firing.

No comments:

Post a Comment

Feel free to give constructive feedback or let me know if it was helpful.