Need a good ASP.NET menu

2019-05-23 11:09发布

I am looking for a good menu to use in an ASP.NET. I am currently using the asp menu. I need it to work in IE 6,7,8, Firefox and Safari. I also need it to not add a lot of overhead to the page client-side. I need to be able to load it from the database.

标签: c# asp.net menu
3条回答
一夜七次
2楼-- · 2019-05-23 11:20

I came to this post because I was experiencing the whitespace issues using IE8. If anyone else is after a quick fix for this try to manually set the z-index property of the Menu item's DynamicMenuStyle property, here is what I did for the css for it.

    .HorizontalMenu_DynamicMenuStyle
{
    font-family: Verdana;
    font-size: medium;
    background-color: #FCFCFC;
    border: solid 1px green;
    z-index: 100;
}

And have a look at this

http://blogs.msdn.com/giorgio/archive/2009/02/01/asp-net-menu-and-ie8-rendering-white-issue.aspx

http://weblogs.asp.net/bleroy/archive/2009/03/23/asp-menu-fix-for-ie8-problem-available.aspx

查看更多
你好瞎i
3楼-- · 2019-05-23 11:31

Write your own Server Control which implements the asp.net menu control but go one step further and implement the CSS friendly adapters which will give you standards compliant code instead of the usual garbage html tables that asp:menu creates.

You can read more here: http://www.asp.net/cssadapters/Whitepaper.aspx

查看更多
放我归山
4楼-- · 2019-05-23 11:38

You can use this code as inspiration: http://trac2.assembla.com/GiusCms/browser/trunk/Controls/Controls/Menu.cs

This control is able to use any SiteMapDataSource. Or you can simply customize it as you want. Use CSS to hide and show inner submenus.

查看更多
登录 后发表回答