-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Advanced Microsoft Content Management Server Development
ASP.NET provides several time-saving techniques for performing client-side and server-side validation in the form of a set of validation controls. There is the RequiredFieldValidator for ensuring that mandatory fields are never left empty, the RangeValidator, which checks that the entered value lies within acceptable limits, the CompareValidator for comparing values entered in two different controls, and the RegularExpressionValidator, which checks if the value matches the pattern defined by a given regular expression.
With minimal effort, developers can make use of these controls to provide validation within web forms. For example, to check that a required field has not been left empty, simply drag and drop the RequiredFieldValidator from the toolbox onto the web form, set the name of the control to be validated and a friendly error message to display. With the validation control in place, the form may only be submitted when the field is...
Change the font size
Change margin width
Change background colour