在asp.net中使用“用户角色"打开网页 [英] Open web page using User Role in asp.net

查看:117
本文介绍了在asp.net中使用“用户角色"打开网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何根据asp.net中的用户角色打开网页
会员的帮助


谢谢.

How i can open a web page acording to user role in asp.net whith
the help of membership


THank''s in Adwanced......

推荐答案

浏览以下链接以了解有关ASP.NET和授权中用户角色的所有信息:
MSDN:如何:在ASP.NET 2.0中使用角色管理器 [ ASP.NET 2.0第I部分中的成员资格和角色提供程序 [ MSDN:ASP.NET授权 [
Go through these links to understand all about User roles in ASP.NET and Authorization:
MSDN: How To: Use Role Manager in ASP.NET 2.0[^]
Membership and Role Providers in ASP.NET 2.0 Part I[^]
MSDN: ASP.NET Authorization[^]

These should help you out in page authorization based on specific roles.


您可以使用会话并在会话中存储用户的角色,并可以在页面加载事件中检查任何页面和然后编写代码,以确定特定用户是否可以看到此页面,如果没有,则应将其重定向到另一页面.

希望对您有帮助.
you can use session and store the role of the user in session and can check it on the page load event for any page and then write the code whether a specific user can see this page and if not he should be redirected to the other page.

hope it helped you.


这篇关于在asp.net中使用“用户角色"打开网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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