今天偶逛CodeProject,又发现个好东东,另一种实现父菜单选中的方法,之前找到过一个,CSSAdapters(http://www.asp.net/cssadapters)的方法,这个又是一种,都很经典的说

这个新的方式也很不错
我将sample code留下来,以后也会记得,嘿嘿 原文: http://www.codeproject.com/KB/webforms/AspMenuParentHighlighting.aspx

使用js来实现的,恩,页面会有太多的js,如果菜单很多,那么应该也会很慢的应该,性能考量不见的比上面那个CSSAdapters的好,CSSAdapter配置确实要麻烦很多不过

html
 1

code behind

 1父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System;
 2父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Collections.Generic;
 3父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Configuration;
 4父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Data;
 5父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Linq;
 6父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Web;
 7父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Web.Security;
 8父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Web.UI;
 9父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Web.UI.HtmlControls;
10父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Web.UI.WebControls;
11父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Web.UI.WebControls.WebParts;
12父菜单高亮; ASP.NET Menu parent menuitem highlightingusing System.Xml.Linq;
13父菜单高亮; ASP.NET Menu parent menuitem highlighting
14父菜单高亮; ASP.NET Menu parent menuitem highlightingpublic partial class _Default : System.Web.UI.Page 
15

相关文章:

  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-08-25
  • 2021-07-29
  • 2021-07-26
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-06-30
相关资源
相似解决方案