Besides the ValidationSummary control the other controls share a few properties.
Property |
Purpose |
|---|---|
ControlToValidate |
This associates the validation control with a control to validate. |
Text |
This is the message the validation control displays. |
ErrorMessage |
This is the error message that is displayed in the ValidationSummary control provided there is ofcourse a ValidationSummary control. ValidationSummary controls are not required but can be a good practice. It’s very important to note that this text will also be displayed in the validation control if the Text Property is not set and the ErrorMessage is set. Many developers just set the ErrorMessage property and leave the Text property out. Another common scenario is to set the Text property to an asterisk * and the ErrorMessage to a more detailed description. (Figure 1 demonstrates this practice.) |
Display |
This sets the error message display. You can set the display to one of the following values:
|

If you are using Visual Web Developer you can simply select the control in the designer and then view it's available properties in the properties window.
Read Part 2 How do validation controls work? |
Read Part 4 The RequiredFieldValidator and RegularExpressionValidator Controls |
Get the best asp hosting provider from web-hosting-top.com and save up to 30%
Plug and play ASP membership script that integrates with PayPal to let you charge recurring membership fees.
