ValidationSummary does not show error message

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" />

Who is Participating?
guru_samiConnect With a Mentor Commented:
Also make sure you have that set for your PostBack control as well i.e. if you have a submit button
because For ValidationSummary and TextBox controls you have   ValidationGroup="aaa"
but not for RequiredFieldValidatorControl
So set  ValidationGroup="aaa" for valRequired as well
treehouse2008Author Commented:
I have another related question. I have start a new question for it. Could you please help me with it. Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.