I want to change the font size/text size of radiobuttonlist. I used the following code:
<asp:RadioButtonList ID="rblCatName" runat="server" Font-Size="9px" AutoPostBack="true" RepeatDirection="Horizontal" onselectedindexchanged="rblCatName_SelectedIndexChanged">
but it is working. I also tried in the code behind but is not working:
protected void rblMainCatName_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
rblCatName.Items.Clear();
string strQuery = "Select * from MT_Category where MTId='" + rblMainCatName.SelectedItem.Value + "' and IsActive=0";
SqlDataAdapter daCat = new SqlDataAdapter(strQuery, con);
DataSet dsCat = new DataSet();
daCat.Fill(dsCat);
if (dsCat.Tables[0].Rows.Count > 0)
{
rblCatName.DataSource = dsCat.Tables[0];
rblCatName.DataTextField = "CatName";
rblCatName.DataValueField = "MCId";
rblCatName.DataBind();
rblCatName.Font.Size =FontUnit.Smaller;
}
}
catch (Exception ex)
{
throw ex;
}
}
Please suggest me what is should do to change the radiobuttonlist font size.