如何从内容页面禁用母版页的菜单项 [英] How to Disable Menu items of master page from content page

查看:69
本文介绍了如何从内容页面禁用母版页的菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在母版页中使用菜单控件来显示菜单,如何在运行时禁用某些特定的菜单项?



2--我有不同的用户,对于每个用户登录,应禁用某些特定的菜单项,在哪里以及如何设置要禁用的项?

I am using the Menu control in master page to display a menu, How can i disable some particular menu items at runtime?



2-- I have different users, for each user login some particular menu item should be disabled, where and how can i set the items to be disabled?

推荐答案

Stroe数据库中的菜单项,并且当您填充菜单时,仅从用户具有正确角色的数据库中拉出菜单项.
Stroe the menu items in a database and when you populate the menu, only pull menu items from the database that the user has the correct role for.


检查这些博客
http://forums.asp.net/t/1402337.aspx/1 [ ^ ]
https://forums.asp.net/t/1733381.aspx/1?Disable+menu+items+on+master+page+from+content+page+code+behind [ ^ ]
--NDK
check these blogs
http://forums.asp.net/t/1402337.aspx/1[^]
https://forums.asp.net/t/1733381.aspx/1?Disable+menu+items+on+master+page+from+content+page+code+behind[^]
--NDK


看看Jeff Prosises'' SQL您一直在等待站点地图提供者 [ ^ ]

这显示了实现Johns建议的一种方法.

您可以将站点地图用作菜单的数据源.

最好的回忆
Espen Harlinn
Take a look at Jeff Prosises'' The SQL Site Map Provider You''ve Been Waiting For[^]

This shows one way to implement Johns suggestion.

You can use the sitemap as a datasource for your menu.

Best resgards
Espen Harlinn


这篇关于如何从内容页面禁用母版页的菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆