I need to manipulate the attributes of a label element inside an ASP.NET CheckBoxList control. Each checkbox label needs to have a different class. The best alternative I see is to apply the classes with jQuery after the fact. Does anyone know a better method?
I found this post marginally helpful, however, adding an attribute to the list item only wraps the input element and the label element in a span tag with the denoted attributes.
Maybe you already thought about it, but you can try to make use of ASP.NET Control Adapters. Control adapters let you change the HTML markup produced by ASP.NET controls.
Checkout the links below for a introduction: