There are many ways to do this..
1. Use
Font-Size attribute
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Name cann't be blank" ControlToValidate="TextBox1" Font-Size="Small"></asp:RequiredFieldValidator>
or
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Name cann't be blank" ControlToValidate="TextBox1" Font-Size="11px"></asp:RequiredFieldValidator>
2. Use
style property
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Name cann't be blank" ControlToValidate="TextBox1" style="font-size:11px;"></asp:RequiredFieldValidator>
3. Through
code behind.
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
RequiredFieldValidator1.CssClass = "err";
}
}
I think you missed to write your code in
PageLoad event. check again.. hope this will help you..