Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET ValidationSummary Control

ASP.NET ValidationSummary Control


Validation Server Controls Validation Server Controls


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 specified by the ErrorMessage property of each validation control. If a validation control's ErrorMessage property is not set, no error message is displayed for that validation control.


property

property Description
DisplayMode How the summary is displayed. The legal values are:
  • BulletList
  • List
  • SingleParagraph
  • | | EnableClientScript | A Boolean value that specifies whether client-side validation is enabled. | | Enabled | A 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 | A Boolean value that specifies whether the validation summary is displayed in a message box. | | ShowSummary | A Boolean value that specifies whether the ValidationSummary control is shown or hidden. |

    Example

    Validationsummary
    In this example, we use the ValidationSummary control to generate a list of required fields left blank for the user to fill in.

    Validationsummary 2
    In this example, we use the ValidationSummary control to display a message box of required fields left blank for the user to fill in.


    Validation Server Controls Validation Server Controls