Solved

ValidationSummary does not show error message

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
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…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

708 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

17 Experts available now in Live!

Get 1:1 Help Now