I am using checkboxlist in my web page as follows:
<asp:CheckBoxList ID="chklstTelpas" runat="server" RepeatDirection="Horizontal"
AutoPostBack="True" Width="594px"
OnSelectedIndexChanged="chklstTelpas_SelectedIndexChanged">
<asp:ListItem Text="TELPAS Speaking" Value="1"></asp:ListItem>
<asp:ListItem Text="TELPAS Listening" Value="2"></asp:ListItem>
<asp:ListItem Text="TELPAS Reading" Value="3"></asp:ListItem>
<asp:ListItem Text="TELPAS Writing" Value="4"></asp:ListItem>
</asp:CheckBoxList>
Now if I check a list item, I would like to apply some background color for that particular selected item. If i uncheck, I would like the background to remain the same color that was initially displayed, or I would like to remove the background color.
You can do something like this
This will allow you to color several of the choices. If you use the SelectedIndex it wil only give you the lowest index.