thegunner
thegunner

Reputation: 7163

asp:DropDownList - possible to have submenu?

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,

Upvotes: 0

Views: 1294

Answers (2)

hunter
hunter

Reputation: 63562

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>

Upvotes: 1

brendan
brendan

Reputation: 29996

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

Upvotes: 0

Related Questions