I am trying to create a custom control that inherits from DropDownList.
What I need is to add a new property to a ListItem(within Item collection).
<cc1:MyDropDownList ID="MyDropDownList1" runat="server">
<asp:ListItem myProperty="true" text="sometext" ... />
</cc1: MyDropDownList>
How can I do that?
Even if you inherit from the DropDownList you cannot add this property because you have to add it to the ListItem control.
But the problem is that ListItem class is sealed so you cannot inherit from it.
Can you extend the capabilities client-side with jQuery?