Is there any way where we can globalize RegularExpressionValidator errorMessage? and instead of calling the error message from we can call it off a resource file ?
Here is what I have:
<FooterTemplate>
<asp:TextBox ID="addCREDIT_TYPE" style="WIDTH: 55px" Runat="Server" MaxLength="1"></asp:TextBox>
<asp:RegularExpressionValidator ID="valCreditType" ControlToValidate="addCREDIT_TYPE" ValidationExpression="B|P|C|b|p|c"
ErrorMessage="Invalid Type. Enter B or C or P" Runat="server" Display="Dynamic"></asp:RegularExpressionValidator>
</FooterTemplate>
This is what worked for me. Just in case if someone gets stuck in same position heres the answer. It was pretty simple.
ErrorMessage=”<%# Resources.MyProject.CustomErrorMessage %>”