最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

SEO心得admin38浏览0评论
本文介绍了如何创建具有不同访问级别的菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有四个不同的用户角色,每个用户都可以访问某些 页面.如何根据用户访问权限设置条件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.

发布评论

评论列表(0)

  1. 暂无评论