ASP.NET 3.5 C#:最好的方法来创建和显示与子菜单动态菜单

问题描述:

我通常只需要创建一个DataTable一个中继器,并拥有所有这个网站在我的codebehind。我还没有找到动态地添加子菜单的简单方法。有没有人有办法做到这更好的?

I usually just create a datatable with one repeater and have all this html in my codebehind. I have not found an easy method for adding a submenu dynamically. Does anyone have a way to do this better?

渲染为列表(的嵌套列表<李>< /李>在元素< UL>< / UL> )。使用一个jQuery插件菜单要转换为动态菜单。

Render as a nested list of lists (<li></li> elements in a <ul></ul>). Use a jQuery menu plugin to convert to a dynamic menu.