开发者

asp:DropDownList - possible to have submenu?

开发者 https://www.devze.com 2023-01-23 20:22 出处:网络
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?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消