Chapter 4. Validation Server Controls
When you look at the Toolbox window in Visual Studio 2008—especially if you've read Chapters 2 and 3, which cover the various server controls at your disposal — you may be struck by the number of server controls that come with ASP.NET 3.5. This chapter takes a look at a specific type of server control you find in the Toolbox window: the validation server control.
Validation server controls are a series of controls that enable you to work with the information your end users input into the form elements of the applications you build. These controls work to ensure the validity of the data being placed in the form.
Before you learn how to use these controls, however, this chapter will first take a look at the process of validation.
Understanding Validation
People have been constructing Web applications for a number of years. Usually the motivation is to provide or gather information. In this chapter, you focus on the information-gathering aspect of Web applications. If you collect data with your applications, collecting valid data should be important to you. If the information isn't valid, there really isn't much point in collecting it.
Validation comes in degrees. Validation is a set of rules that you apply to the data you collect. These rules can be many or few and enforced either strictly or in a lax manner: It really depends on you. No perfect validation process exists because some users may find a way to cheat to some degree, no matter what rules ...
Get Professional ASP.NET 3.5 SP1 Edition: In C# and VB 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.