Chapter 3. Performing Form Validation with Validation Controls


  • Using Client-side Validation

  • Requiring Fields: The RequiredFieldValidator Control

  • Validating Expressions: The RegularExpressionValidator Control

  • Comparing Values: The CompareValidator Control

  • Checking for a Range of Values: The RangeValidator Control

  • Performing Custom Validation: The CustomValidator Control

  • Disabling Validation

In this chapter, you learn how to use the Validation Web controls to validate the information that a user enters into an HTML form.

You can use the Validation controls to perform very different types of form validation tasks . For example, you can use the Validation controls to check whether a form field has a value, check whether the data in a form field falls in a certain range, or check whether a form field contains a valid e-mail address or phone number.


You can view "live" versions of many of the code samples in this chapter by visiting the Superexpert Web site at:

At the end of this chapter, you also learn how to create custom validation functions by using the CustomValidator control. Even if you need to perform a very specialized form validation task, you can do so by using this control.

ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: