Asp (C#) Listbox Group Items

Feb 24 2010 4:43 AM
Hi,

Is there a way to group items in an <asp:listbox>, the same way as with traditional html select menus.

In traditional html form controls it looks like this:

<select name="Example" id="Example" multiple>
<optgroup label="Group1">
<option value="Value1"></option>
<option value="Value2"></option>
<option value="Value3"></option>
</optgroup>
<optgroup label="Group2">
<option value="Value1"></option>
<option value="Value2"></option>
<option value="Value3"></option>
</optgroup>
</select>


Any help is greatly appreciated.

Answers (1)