Upgrade your Internet Experience
United States - English
Argentina (Español)
Australia (English)
Brasil (Português)
Canada (English)
Canada (Français)
中国 (简体中文)
Colombia (Español)
Deutschland (Deutsch)
España (Español)
France (Français)
India (English)
Italia (Italiano)
日本 (日本語)
México (Español)
Perú (Español)
Россия (Pусский)
United Kingdom (English)
United States (English)
More...
Microsoft.com
Welcome
Sign in
.NET Framework Developer Center
Home
Library
Learn
Downloads
Support
Community
Forums
Printer Friendly Version
Send
Add Content...
Click to Rate and Give Feedback
Give feedback on this content
MSDN Library
MSDN
Please Wait
MSDN Library
Please Wait
.NET Development
Please Wait
.NET Framework 3.5
Please Wait
.NET Framework Class Library
Please Wait
System.Web.Security Namespace
Please Wait
Roles Class
Please Wait
Roles Methods
Please Wait
Switch on low bandwidth view
Collapse All
Members Filter
Include Protected Members
Include Inherited Members
Frameworks Filter
Include .NET Framework Members
Include .NET Compact Framework Members
Include XNA Framework Members
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5
Other versions are also available for the following:
Microsoft Visual Studio 2005/.NET Framework 2.0
.NET Framework 3.0
Microsoft Visual Studio 2010/.NET Framework 4.0
.NET Framework Class Library
Roles Methods
The
Roles
type exposes the following members.
Methods
Name
Description
AddUsersToRole
Adds the specified users to the specified role.
AddUsersToRoles
Adds the specified users to the specified roles.
AddUserToRole
Adds the specified user to the specified role.
AddUserToRoles
Adds the specified user to the specified roles.
CreateRole
Adds a new role to the data source.
DeleteCookie
Deletes the cookie where role names are cached.
DeleteRole
Overloaded.
Removes a role from the data source.
FindUsersInRole
Gets a list of users in a specified role where the user name contains the specified user name to match.
GetAllRoles
Gets a list of all the roles for the application.
GetRolesForUser
Overloaded.
Gets a list of the roles that a user is in.
GetUsersInRole
Gets a list of users in the specified role.
IsUserInRole
Overloaded.
Gets a value indicating whether a user is in the specified role.
RemoveUserFromRole
Removes the specified user from the specified role.
RemoveUserFromRoles
Removes the specified user from the specified roles.
RemoveUsersFromRole
Removes the specified users from the specified role.
RemoveUsersFromRoles
Removes the specified user names from the specified roles.
RoleExists
Gets a value indicating whether the specified role name already exists in the role data source.
Top
See Also
Reference
Roles Class
System.Web.Security Namespace
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
Community Content
Add new content
Annotations
|
Edit
Tags
:
Add a tag
Add
Cancel
Flag as
ContentBug
© 2009 Microsoft Corporation. All rights reserved.
Terms of Use
|
Trademarks
|
Privacy Statement