ASP.NET Validation Controls

ASP.NET offers more validation controls than the one we have already talked about, the RequiredFieldValidator. It also offers the ValidationSummary, the CompareValidator, the RangeValidator, the RegularExpressionValidator, and the CustomValidator controls. The ValidationSummary control is used to display a summary of all the ErrorMessages on a given form. So, if you want to somehow summarize for the user the data validation errors that have occurred in a form, you could use the ValidationSummary control. The CompareValidator control is used to compare the value of a field to another field. The RangeValidator is used to verify that the field value falls within a given range. For example, if you are asking a user for ...

Get Special Edition Using® Microsoft® ASP.NET 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.