Avatar of prain
Flag for United States of America asked on

How to get rid of Validation Summary?


I have the following line in my ASP.NET .aspx page...

<asp:ValidationSummary ID="MyAccountValSum" runat="server" ShowMessageBox="true" ShowSummary="false" DisplayMode="SingleParagraph"  />

But when the page is validated I still see the Summary at the bottom of the page along with the MessageBox. How do I get rid of the Summary and show ONLY THE MESSAGE BOX?

I am using ASP.NET 4.5 /VS 2012

Avatar of undefined
Last Comment

8/22/2022 - Mon
Kyle Abrahams


Try removing DisplayMode or setting it to none.

I have seen many examples on the web including the ones you point to. I have tried several ways. Nothing works.

Here is what I have....

<asp:TextBox ID="maEmail"  runat="server" Width="254px" ValidationGroup="vgMyAccount" ></asp:TextBox>
<asp:TextBox TextMode="Password" ID="maPassword" runat="server" Width="253px"   ValidationGroup="vgMyAccount"></asp:TextBox>

<asp:RequiredFieldValidator ID="reqFieldEmailMa" ForeColor="Red" ControlToValidate="maEmail" Text="Email Is Required" runat="server" ValidationGroup="vgMyAccount" />

<asp:RequiredFieldValidator ID="reqFieldPasswordMa" ForeColor="Red" ControlToValidate="maPassword" Text="The Password field is required!" runat="server" ValidationGroup="vgMyAccount"  />

<asp:ValidationSummary ID="MyAccountValSum" runat="server" ShowMessageBox="true" ShowSummary="false" ValidationGroup="vgMyAccount" />

In fact, above is the last tried combination. I teid sevral others, - adding removing properties....
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question