Solved

ValidationSummary does not show error message

Posted on 2009-05-19
3
814 Views
Last Modified: 2012-05-07
I used the following code to try ValidationSummary. But ValidationSummary  does not show the error message.  Please tell me what I missed. Thanks.

<asp:TextBox ID="txtRequired" ValidationGroup="aaa" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="valRequired"  Display="Static" ControlToValidate="txtRequired" Text="*" ErrorMessage="Required" runat="server"></asp:RequiredFieldValidator>

<asp:ValidationSummary ID="val" HeaderText="Error:" Font-Names="verdana"
                Font-Size="12" DisplayMode="BulletList"  Enabled="true"  ShowSummary="true"  ValidationGroup="aaa" runat="server" />

0
Comment
Question by:treehouse2008
  • 2
3 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 24426095
because For ValidationSummary and TextBox controls you have   ValidationGroup="aaa"
but not for RequiredFieldValidatorControl
So set  ValidationGroup="aaa" for valRequired as well
0
 
LVL 41

Accepted Solution

by:
guru_sami earned 125 total points
ID: 24426127
Also make sure you have that set for your PostBack control as well i.e. if you have a submit button
0
 

Author Closing Comment

by:treehouse2008
ID: 31583184
Thanks.
I have another related question. I have start a new question for it. Could you please help me with it. Thanks.
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_24422405.html
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Input parameteres to DragOver 2 38
JQuery Detecting page post back 6 21
c# DateTime Format validation 4 70
Trigger C# code inside the SQL Server 6 36
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question