Link to home
Start Free TrialLog in
Avatar of prain
prainFlag 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 Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Try removing DisplayMode or setting it to none.
Avatar of prain


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" />
Avatar of prain


In fact, above is the last tried combination. I teid sevral others, - adding removing properties....
Avatar of guru_sami
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial