7.5. Validation controls
Validation controls are used along with an input control to test what the user enters for that input control. Validation controls can check for a required field, test against a specific value pattern of characters, and so on.
Only a subset of HTML and web server controls can work with validation controls. Before using the control, check if it has a ValidationPropertyAttribute. The following controls can be used with validation controls:
HTMLInputText;
HTMLTextArea;
HTMLSelect;
HTMLInputFile;
TextBox;
DropDownList;
ListBox;
RadioButtonList.
All validation controls have a set of common properties defined by the ancestor class BaseValidator. These properties are listed overleaf.
ControlToValidate Specifies the ID of the input ...
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