Solved

ValidationSummary does not show error message

Posted on 2009-05-19
3
811 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now