Wilson Wilson - 3 months ago 20
ASP.NET (C#) Question

How to make a radiobutton text bold?

I have a radiobutton and want to show its text as bold.

1) I have tried with

<asp:RadioButton ID="RadioButtonLevel0" runat="server"
GroupName="ItemAccess" value="0" AutoPostBack="true"
oncheckchanged="RadioButton_CheckedChanged"
Text="Only to Me" Font-Bold="true"/>


... But it is still showing the text with normal font-weight.




2) I have tried with

<asp:RadioButton ID="RadioButtonLevel0" runat="server"
GroupName="ItemAccess" value="0" AutoPostBack="true"
oncheckchanged="RadioButton_CheckedChanged"/>
<b>Only To Me</b>
</asp:RadioButton>`


But this is producing an error.

sms sms
Answer

I think it is surely because of css of parent control. check with inspect element and know which parent control is cause for this. For example if label is the cause then modify the css class as

.bold > label {
    font-weight:bold !important;
}

... This will solve your problem.