Well expand the code inside this method in later chapters, but for the time being,
you can rest assured that youve put the validation mechanism in place.
Summary
As weve seen, the validation controls available through ASP.NET are very
powerful. This chapter explained how to validate required form fields with the
RequiredFieldValidator, compare form fields with the CompareValidator,
check for a numeric range within form fields with the RangeValidator, provide
a user with a summary of errors using the ValidationSummary control, check for
email addresses with the RegularExpressionValidator, and perform your own
custom validation with the CustomValidator.
In the next chapter, well begin to introduce you to the challengesand re-
wards!involved in working with databases. This is a skill youll almost certainly
need when building any non-trivial real-world web application, so roll up your
sleeves and lets get into it!
250
Chapter 6: Using the Validation Controls

Get Build Your Own ASP.NET 2.0 Web Site Using C# & VB, Second Edition 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.