How can styles be applied to CheckBoxList ListItems. Unlike other controls, such as the Repeater where you can specify <ItemStyle>
, you can't seem to specify a style for each individual control.
Is there some sort of work around?
asp.netcoding-stylecontrolshtml
How can styles be applied to CheckBoxList ListItems. Unlike other controls, such as the Repeater where you can specify <ItemStyle>
, you can't seem to specify a style for each individual control.
Is there some sort of work around?
Best Solution
You can add Attributes to ListItems programmatically as follows.
Say you've got a CheckBoxList and you are adding ListItems. You can add Attributes along the way.
This will make the color of the listitem text red. Experiment and have fun.