ValidationSummary Class
Assembly: System.Web (in system.web.dll)
The ValidationSummary class is used to summarize the error messages from all validators on a Web page in a single location. You can summarize the error messages from a group of validators on a Web page by assigning the ValidationSummary control to a validation group by setting the ValidationGroup property.
The summary can be displayed as a list, as a bulleted list, or as a single paragraph, based on the DisplayMode property.
The summary can be displayed on the Web page and in a message box by setting the ShowSummary and ShowMessageBox properties, respectively.
For a list of initial property values for an instance of ValidationSummary, see the ValidationSummary constructor.
The following code example demonstrates how to use a ValidationSummary control to summarize the error messages from all validation controls on a Web page and display them in a bulleted list.
Security Note: |
|---|
| This example has a text box that accepts user input, which is a potential security threat. By default, ASP.NET Web pages validate that user input does not include script or HTML elements. For more information, see Script Exploits Overview (Visual Studio). |
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
System.Web.UI.WebControls.ValidationSummary
Security Note: