ASP.NET DropDownList with OptionGroup support
I didn't even know the existence of this so useful optgroup in the DropDownList control implemented by XHTML (well we learn everyday!).
I wish I would be happy to have this solution before!
ASP.NET 2.0, for all its bells and whistles, lacks the odd bit of functionality for reasons completely unknown. One such notable omission is that of OptionGroup (<optgroup>) support in the DropDownList control. For those unfamiliar with the <optgroup> element, it is part of the XHTML standard and has the effect of categorising items in a <select> as the following image shows.