Use ASP.NET validation controls
ASP.NET has always evolved with the goal of reducing the effort developers must expend to get their Web sites up and running. One of the things you'll find as you tour ASP.NET is that Microsoft has done a great job of anticipating what the developer needs and putting it in the framework. In Chapters 3, 4, and 5 we saw the architecture behind ASP.NET Web forms and controls. With this architecture in place, you can easily extend the framework to do almost anything you want it to do.
ASP.NET versions 1.0 and 1.1 took over much of the functionality developers were building into their sites with classic ASP. For example, server-side controls handled much of the arduous coding that went into developing Web sites displaying consistent user interfaces (such as combo boxes that always showed the last selection that was chosen).
ASP.NET 2.0 continues that theme by introducing new server-side controls that insert commonly desired functionality into the framework. In this chapter, we look at support provided by ASP.NET for validating the data represented by controls as well as a couple of the various navigation controls (the MultiView control and the TreeView control).
Let's start with the validation controls.