Validation Controls
A key rule for writing more secure applications is to get the data right, before you use it. Getting the data right requires you to apply a validation step to any external input. In ASP.NET, validation controls provide an easy-to-use mechanism to perform a variety of validation tasks, including testing for valid types, values within a given range, or required fields.
Validation controls inherit from the BaseValidator class which, in turn, descends from Label. All validators defined on a page are automatically grouped in the Validators collection of the Page class. You can validate them all in a single shot using the Validate method in the page class or individually by calling the Validate method on each validator. The Validate ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access