O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required