Performing Web Form Validation

If you want to collect garbage from your users, avoid validating their data. On the other hand, proper use of the validation controls can help your users enter the correct information. The validations controls provided by ASP.NET should cover most needs. When they fall short, you can provide your own custom validation logic.

Validation controls allow you to specify the type of validation to occur and the error message that occurs when the user enters faulty data. Validation controls work just like Server controls in that you place them on the form and set their properties. When the form is rendered in HTML, the validation routines can be handled on the client side, thus preventing a round-trip to the server and ...

Get Delphi for .NET Developer’s Guide 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.