I'm using开发者_运维百科 the asp.net dropdownlist which is populated from a database. Is it possible to have sub menus on any of the options in the list? Or how could this normally be done?
Thanks,
Could just add a type of prefix to specify a sub item like so:
<select>
<option>Top</option>
<option> - Sub Topic</option>
</select>
You might be better off using nested lists that are CSS styled properly
<ul>
<li>Topic
<ul>
<li>Sub Topic</li>
</ul>
</li>
</ul>
I don't think it's exactly possible using the DropDownList. It can be done using the asp.net menu control though: http://msdn.microsoft.com/en-us/library/ecs0x9w5%28VS.80%29.aspx
精彩评论