Validation Controls

A set of validation controls is provided with ASP.NET. These controls enable you to indicate how user input should be validated for a page before the page is processed. In this way, you can ensure that a user has entered data in all the required fields and validate that this data meets your application’s constraints.

Controls are always validated on the server and prevent an ASP page from processing if validation fails (see the page life cycle discussed previously). The controls can emit JavaScript to be run on the client, too (the EnableClientScript property is set to True by default). In this way, a user is notified of any page-level validation errors before having to submit the page to the server.

To use the validation ...

Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.