Visual Studio .NET - validation summary - Asked By Aarthi R on 02-Aug-06 04:11 AM


im using regularexpression validator. the error message of this control should b displayed in the validation summary only not in regularexpressoin validation control. how to do this.

hello - Asked By K Pravin Kumar Reddy on 02-Aug-06 05:00 AM


just set the ValidationGroup for all validation controls and place that group name in button validationGroup property, thats it u will see validation status/ message in both..

thanks but - Asked By Aarthi R on 02-Aug-06 07:00 AM

i want to display the error message in validation summary only not in validation controls....

checek this out - Asked By K Pravin Kumar Reddy on 02-Aug-06 07:04 AM

then u have make disple property in validation control to none.. then its work
Asked By Sushila Patel on 02-Aug-06 10:10 AM
You will have to try as
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" runat="server"></asp:TextBox>

<!--Note the Display property set to none for the Validation Control-->
<asp:RequiredFieldValidator id="RequiredFieldValidator2" style="Z-INDEX: 104; LEFT: 192px; POSITION: absolute; TOP: 40px" runat="server" ErrorMessage="RequiredFieldValidator" ControlToValidate="TextBox2" Display="None"></asp:RequiredFieldValidator> 

<asp:Button id="Button1" style="Z-INDEX: 106; LEFT: 112px; POSITION: absolute; TOP: 88px" runat="server" Text="Button"></asp:Button>

<asp:ValidationSummary id="ValidationSummary1" style="Z-INDEX: 105; LEFT: 80px; POSITION: absolute; TOP: 136px" runat="server"></asp:ValidationSummary>