Validation Controls and How They Work

Validation controls are used between <FORM> tags in a Web Form, and they validate that the user enters or selects the proper data from INPUT controls, such as the TextBox, TextArea, or ListBox. For example, you might validate that the user entered data into a required TextBox field or that an e-mail address was entered into a TextBox in the correct format (donny.mack@dotnetjunkies.com)—the correct format being:

  1. donny.mack—One or more characters

  2. @—sign

  3. DotNetJunkies—One or more characters

  4. .—a Period

  5. com—a URL Extension

When using a .NET validation control, you have the option to validate data on the server-side, the client side, or both. For security reasons, server-side validation occurs regardless of whether ...

Get Programming Data-Driven Web Applications with ASP.NET 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.