开发者

Access to the RoleProvider?

开发者 https://www.devze.com 2023-02-18 10:31 出处:网络
If I have two tables in my project to have access to such a blog (blog writers access) and one for friends access.

If I have two tables in my project to have access to such a blog (blog writers access) and one for friends access. 开发者_高级运维I use if I want the RoleProvider What is the form?


This question is very ambiguous and suggestions you need to do some reading on ASP.NET membership/roles... but to check if the user is in a role, you just do this:

User.IsInRole("role name")


Roles.Provider gets the default Role Provider.

Roles.Providers gets the collection of Role Providers for the ASP.NET application.

Look into the System.Web.Security namespace

0

精彩评论

暂无评论...
验证码 换一张
取 消