How to change Background Color of CheckBox Programmaticlly

Hi, In this ASP.Net post we are going to learn How to change Chackbox contol Background programmatically in ASP.Net with C#.

STEP 1 – Design the ASP.Net web form like :

<table border=”1″ bordercolor=”#000000″ style=”z-index: 100; left: 272px; position: absolute;
top: 72px”>
<tr>
<td colspan=”3″ style=”width: 582px; height: 100px;”>
<asp:Image ID=”Image1″ runat=”server” ImageUrl=”http://meeraacademy.com/wp-content/themes/elemin/uploads/logo/meeralogo.gif” /></td>
</tr>
<tr>
<td colspan=”3″ rowspan=”2″ style=”width: 582px; height: 21px; text-align: center”>
<table style=”width: 496px”>
<tr>
<td colspan=”1″ style=”width: 274px; height: 24px”>
<strong><span style=”font-size: 14pt; color: #6600cc; font-family: Arial”>Change CheckBox
Bg Color Programmatically</span></strong></td>
</tr>
<tr>
<td style=”width: 274px; height: 8px;”>
&nbsp;
</td>
</tr>
<tr>
<td style=”width: 274px; height: 22px; text-align: center;”>
&nbsp;<asp:CheckBox ID=”CheckBox1″ runat=”server” Text=”CheckBox Back Ground Color” Font-Bold=”True” /></td>
</tr>
<tr>
<td style=”width: 274px”><asp:Button ID=”Button1″ runat=”server” OnClick=”Button1_Click” Text=”Red BackGround” Font-Bold=”True” /><asp:Button ID=”Button2″ runat=”server” OnClick=”Button2_Click” Text=”Blue BackGround” Font-Bold=”True” /></td>
</tr>
<tr>
<td style=”width: 274px; text-align: center”>
</td>
</tr>
</table>
</td>
</tr>
<tr>
</tr>
</table>

The ASP.Net Checkbox Example output is :

Change Background color CheckBox control in ASP.Net with C#

Change Background color CheckBox control in ASP.Net with C#

The ASP.Net Checkbox Example output is :

Change Background color CheckBox control in ASP.Net with C#

Change Background color CheckBox control in ASP.Net with C#

The ASP.Net Checkbox Example output is :

Change Background color CheckBox control in ASP.Net with C#Change Background color CheckBox control in ASP.Net with C#

Change Background color CheckBox control in ASP.Net with C#

I hope this Change Background color of Checkbox control ASP.Net Example will help you…

Leave a Reply

Your email address will not be published. Required fields are marked *

3 + 3 =


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">