Reputation: 171
PROBLEM :
Code 1 (With Text Properties):
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter Your Name" ControlToValidate="Name" CssClass="ErrorMessage" Text="*"></asp:RequiredFieldValidator>
Before Pressed Button (No Text Seen):
After Pressed Button :
*
Code 2 (Without Text Properties):
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Enter Your Name" ControlToValidate="Name" CssClass="ErrorMessage"></asp:RequiredFieldValidator>
Before Pressed Button (No Text Seen):
After Pressed Button :
Enter Your Name
What i want try to do
Before Pressed Button :
*
After Pressed Button :
Enter Your Name
Previously, i had issue with error :
WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive).
and i got the solution : here
by add the following code :
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
But, now i'm facing new issue with the text properties.. i don't know what the problems. Any help would be appreciate. Thx in advance.
Upvotes: 0
Views: 477
Reputation: 54
on PageLoad event what you have to do is foreach (RequiredFieldValidator look if Validation==true then change the text to * and show the RequiredFieldValidator..
Upvotes: 1