Click here to Skip to main content
15,905,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In required field validator I have an error message. I dont want this error message to appear on the form except with the validation summary. Can anyone guide me?

XML
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
  ControlToValidate="TextBox3" ErrorMessage="Name cant be blank"
  style=""></asp:RequiredFieldValidator>


Thanks.
Posted

Try with
Display="None" 

ASP.NET
<asp:requiredfieldvalidator id="RequiredFieldValidator6" runat="server"
  ControlToValidate="TextBox3" ErrorMessage="Name cant be blank" Display="None"></asp:requiredfieldvalidator>
 
Share this answer
 
v2
C#
<asp:validationsummary id="ValidationSummary2" runat="server" xmlns:asp="#unknown">
     ShowSummary="true"
     ShowMessageBox="true"
     HeaderText="Please fix the following fields:"
     EnableClientScript="true"
     DisplayMode="List"/>
</asp:validationsummary>


Try this code and see.
 
Share this answer
 
XML
<asp:validationsummary id="ValidationSummary1" runat="server" xmlns:asp="#unknown">
     ShowSummary="false"
     ShowMessageBox="true"
     HeaderText="Please fix the following fields:"
     EnableClientScript="true"
     DisplayMode="List"/>
</asp:validationsummary>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900