如何创建具有不同访问级别的菜单?

编程入门 行业动态 更新时间:2024-10-14 12:23:14
本文介绍了如何创建具有不同访问级别的菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有四个不同的用户角色,每个用户都可以访问某些 页面.如何根据用户访问权限设置条件asp菜单

I have got four different user roles, with each user having access to certain pages. How can I setup a conditional asp menu based on the user access level?

推荐答案

像这样(假设您使用的是表单身份验证) villagecoder.wordpress/2008/08/29 /creating-a-role-based-aspnet-menu/ like this (assuming you are using forms authentication) villagecoder.wordpress/2008/08/29/creating-a-role-based-aspnet-menu/

通常,菜单链接到URL.所以.. 在您的网络配置文件中有这样的 Usually the menu links to an URL. So.. In your web config file have like this <system.web> <authorization> <deny users="?" /> </authorization> </system.web> <location path="Default2.aspx"> <system.web> <authorization> <allow users="Jack" /> <deny users="*" /> </authorization> </system.web> </location>

因此,default2.aspx仅允许分配的用户使用.可以使用逗号分隔的用户. 有关更多详细信息,请参见此链接.. www.asp/security/tutorials/user-based-authorization-cs [^ ] Microsoft文档 msdn.microsoft/en-us/library/wce3kxhd.aspx [ ^ ]

so the default2.aspx will be only allowed for the users assigned. Can use comma separated users. For more detail refer this link.. www.asp/security/tutorials/user-based-authorization-cs[^] the Microsoft documentation msdn.microsoft/en-us/library/wce3kxhd.aspx[^]

ASP.NET菜单和SiteMap安全性修剪 请留下您的评论帮助与否. ASP.NET Menu and SiteMap Security Trimming Please leave you comment helps or not.

更多推荐

如何创建具有不同访问级别的菜单?

本文发布于:2023-11-30 09:01:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1649447.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:菜单   级别

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!