Solved

ValidationSummary does not show error message

Posted on 2009-05-19
3
815 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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