DefaultRoleProvider.IsUserInRole Method (String, String)
Determines whether a user is in a role.
Namespace: System.Web.Providers
Assembly: System.Web.Providers (in System.Web.Providers.dll)
Syntax
public override bool IsUserInRole(
string username,
string roleName
)
public:
virtual bool IsUserInRole(
String^ username,
String^ roleName
) override
override IsUserInRole :
username:string *
roleName:string -> bool
Public Overrides Function IsUserInRole (
username As String,
roleName As String
) As Boolean
Parameters
username
Type: System.StringThe name of the user to search for.
roleName
Type: System.StringThe name of the role to search in.
Return Value
Type: System.Boolean
true if the specified user is in the specified role; otherwise, false.
See Also
DefaultRoleProvider Class
System.Web.Providers Namespace
ASP.NET Identity
Return to top