如何使用asp.net/C#隐藏和取消隐藏menupath中的菜单 [英] how can I hide and unhide the menues in menupath with asp.net/C#

查看:273
本文介绍了如何使用asp.net/C#隐藏和取消隐藏menupath中的菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过用户访问来隐藏和取消隐藏菜单路径中的菜单,我该怎么做?我的意思是我希望一些用户只能看到菜单的一部分,而其他部分应该从菜单中隐藏

I want to hide and unhide the menus in menupath by user access ,how can I do this?I mean I want that some users can see just some part of menus and other part should hide from them

推荐答案

一种方法是检查 User.IsInRole [ ^ ],并在呈现页面时根据需要调整菜单
One way is to check User.IsInRole[^] in the code-behind and adjust the menu as necessary when the page is being rendered


这篇关于如何使用asp.net/C#隐藏和取消隐藏menupath中的菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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