![]()
true if the specified user is in the specified role; otherwise, false.
The Roles.IsUserInRole(string, string) method calls the RoleProvider.IsUserInRole(string, string) method of the default role provider to determine whether a user name is associated with a role from the data source for the application that is specified in the Roles.ApplicationName property.
If username is equal to the current logged-on user and the Roles.CacheRolesInCookie property value is true, roleName may be checked against the role cache rather than the specified Roles.Provider.