Asp.Net 菜单突出显示
我尝试找出在 Asp.Net 中管理菜单并突出显示“活动”菜单项的最佳策略是什么。
这必须在 MasterPage 中完成,但页面知道要突出显示哪个菜单项。
I try to figure out what's the best strategy to manage a menu in Asp.Net and highlight the "active" menu-item.
That's have to be done in the MasterPage but it's the Page that know what menu-item to highlight.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现实现自定义 SQL 站点地图提供程序与实现完全自定义菜单组件相结合,只需要根据应用程序/设计等呈现菜单 html。例如,我最近刚刚使用我们的菜单实现了 jQuery Superfish 菜单成分。
jQuery 非常适合搜索和选择特定的类/元素以及根据需要应用样式/类。
一些有用的网址:
http://users.tpg.com.au/j_birch/plugins /superfish/
http://msdn.microsoft.com/en -us/magazine/cc163657.aspx
http://dotnetslackers.com/VB_NET/ re-17169_Rendering_a_databound_UL_menu.aspx
HTH
I have found that implementing a custom SQL Site Map Provider combined with impementing a fully custom menu component, one just need to render the menu html depending on the application/design etc. For intance I have just recently implemented the jQuery Superfish Menu using our Menu component.
jQuery is great for searching and selecting particular classes/elements and applying styles/classes as required.
Some Helpful URLS:
http://users.tpg.com.au/j_birch/plugins/superfish/
http://msdn.microsoft.com/en-us/magazine/cc163657.aspx
http://dotnetslackers.com/VB_NET/re-17169_Rendering_a_databound_UL_menu.aspx
HTH