Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have one form on that form in that form suppose i have 5 textboxes and m applying validation for each textbox 1st validation is required field validation i want that the error provider show the error icon on each empty textbox when i click on submit button and also at that time the label shows the different different text messsage for each textbox and when i enter any value in any textbox the error provider must be clear for only that textbox..
plzz give me a solution for this fastly..

I don't knw how to explain my problm in very well format so plzz excuse for this if u cant understand it properly
Posted

1 solution

Hi, i did not get your question, but you are asking of the error message to be customized, give your messsage in the tool-tip and error message property of the validation control.

<asp:TextBox ID="UserName" runat="server" ></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName"
ErrorMessage="User Name is required." ToolTip="User Name is required." ForeColor="#CC0000"
ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
 
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