---
title: "ValidationSummary Control in ASP.Net"  
description: "The ValidationSummary control is used to display a summary of all validation errors occurred in a Web page.  PropertiesDisplay ModeHow to display the"  
author: "Pushpendra Singh"  
published: 2010-11-11  
updated: 2020-03-04  
canonical: https://www.mindstick.com/articles/200/validationsummary-control-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# ValidationSummary Control in ASP.Net

The ValidationSummary [control](https://yourviews.mindstick.com/view/83439/bipartisan-gun-control-bill-passed-in-us-after-decades) is used to display a [summary](https://www.mindstick.com/forum/33860/how-to-calculate-column-summary-in-sql-server) of all [validation errors](https://www.mindstick.com/forum/159706/how-to-handle-model-validation-errors-in-a-dot-net-core-api) occurred in a [Web page](https://answers.mindstick.com/qa/92898/how-to-create-a-web-page-using-bootstrap-4).\

```
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
```

![ValidationSummary Control in ASP.Net](https://www.mindstick.com/mindstickarticle/be315491-1b76-4315-b0ab-e688a59e1813/images/eb7a29be-2c0d-4929-8327-87540f0982f8.png)

## Properties

| Display Mode | How to display the summary. Legal values are: · BulletList · List · Single Paragraph |
| --- | --- |
| ShowMessageBox | A Boolean value that specifies whether the summary should be displayed in a message box or not |
| ## Show Summary | ## A Boolean value that specifies whether the ValidationSummary control should be displayed or hidden |

## Code:

```
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />     <asp:Label ID="Label1" runat="server" Text="Name"></asp:Label>     <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"         ErrorMessage="Enter Your Name">*</asp:RequiredFieldValidator>     <br />     <asp:Label ID="Label2" runat="server" Text="Password"></asp:Label>     <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>     <br />     <asp:Label ID="Label3" runat="server" Text="Confirm Password"></asp:Label>     <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>     <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox2"         ControlToValidate="TextBox3" ErrorMessage="NOT MATCHED">*</asp:CompareValidator>     <br />     <asp:Label ID="Label4" runat="server" Text="Email Id"></asp:Label>     <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>     <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox4"         ErrorMessage="enter a valid email id" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>     <br />    <asp:Button ID="Button1" runat="server" Text="Submit" />
```

![ValidationSummary Control in ASP.Net](https://www.mindstick.com/mindstickarticle/be315491-1b76-4315-b0ab-e688a59e1813/images/e634e975-4b53-4dc5-acb5-74709f372286.png)

![ValidationSummary Control in ASP.Net](https://www.mindstick.com/mindstickarticle/be315491-1b76-4315-b0ab-e688a59e1813/images/d28f5ad2-f70e-48f2-b7e8-c492570e050c.png)

---

Original Source: https://www.mindstick.com/articles/200/validationsummary-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
