ASP.NET ValidationSummaryControl
Validation Server Control
Definition and Usage
The ValidationSummary control is used to display a summary of all validation errors on a web page.
The error messages displayed in this control are determined by the ErrorMessage property of each validation control. If the ErrorMessage property of a validation control is not set, no error message will be displayed for that validation control.
Properties
| Property | Description |
|---|---|
| DisplayMode | How to display the summary. Valid values are:
|
| EnableClientScript | Boolean value that specifies whether client-side validation is enabled. |
| Enabled | Boolean value that specifies whether the validation control is enabled. |
| ForeColor | The foreground color of the control. |
| HeaderText | The header text in the ValidationSummary control. |
| id | The unique id of the control. |
| runat | Specifies that the control is a server control. Must be set to "server". |
| ShowMessageBox | Boolean value that specifies whether the validation summary is displayed in a message box. |
| ShowSummary | Boolean value that specifies whether the ValidationSummary control is displayed or hidden. |
Examples
Validationsummary
In this example, we use the ValidationSummary control to generate a list of required fields that were left blank for the user to fill in.
Validationsummary 2
In this example, we use the ValidationSummary control to display a message box for required fields that were left blank for the user to fill in.
Validation Server Control Other Extensions