ASP.NET Developer's JumpStart By Paul D. Sheriff, Ken Getz
Table of Contents
Chapter 8. Validation Controls
The .NET Framework supplies a complete set of validation controls that you can use in your ASP.NET applications. From the simple RequiredFieldValidator control to the CustomValidator control, which allows you to supply both client- and server-side validation procedures, you have complete control over exactly what data you'll accept from your users. You no longer have to write complex scripting code, as you did when creating ASP applications! You'll want to dig into regular expressions a little, as well, because the ability to create your own expressions will cut down on the code you must write.
You can use validation controls to do the following:
Require input or ensure entered data is different from a default value by using the RequiredFieldValidator control
Force entered data to be within a specified range by using the RangeValidator control
Validate common text expressions by using the RegularExpressionValidator control
Supply your own validation rules by using the CustomValidator control
Display a summary of all invalid controls by using the ValidationSummary control
Compare the values of two controls by using the CompareValidator control