asp.net.ph

Skip Navigation Links

ValidationSummary Control

ASP.NET Syntax   ASP.NET Syntax for Validation Controls


Displays a list of all validation errors on the Web page.

Syntax

<asp:ValidationSummary id="accessID" 
   DisplayMode = "BulletList | List | SingleParagraph" 
   EnableClientScript=true | false
   ShowSummary=true | false
   ShowMessageBox=true | false
   HeaderText = "text to display as summary title"
   runat="server" />

For information on the individual members of this class, see ValidationSummary in the class library.

Remarks

The ValidationSummary control allows you to summarize the error messages from all validation controls on a Web page, in a single location.

The summary can be displayed as a list, a bulleted list, or a single paragraph based on the DisplayMode property. The error message displayed for each validation control on the page is specified by the ErrorMessage property of the control. If the ErrorMessage property is not set, the value in the Text property is used instead.

You can show or hide the ValidationSummary control by setting the ShowSummary property to true or false, respectively. The summary can also be displayed in a message box by setting the ShowMessageBox property to true.

Example

The following example demonstrates how to use the ValidationSummary control to summarize the input controls that fail validation on the page.

 Show me 

See Also

ValidationSummary Class   Controlling Validation Message Display   Data Entry Validation ( Client-Side )



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note