System.Web.Security.SqlRoleProvider.IsUserInRole Method

Gets a value indicating whether the specified user is in the specified role.

Syntax

public override bool IsUserInRole (string username, string rolename)

Parameters

rolename
Documentation for this section has not yet been entered.
username
The user name to search for.

Returns

true if the specified user name is in the specified role; otherwise, false.

Remarks

The SqlRoleProvider.IsUserInRole(string, string) method is called by the System.Web.Security.Roles class and the System.Security.Principal.IPrincipal.IsInRole(string) method of the System.Web.UI.Page.User property to determine whether a user is associated with a role in the SQL Server database specified in the ASP.NET application's configuration file (Web.config).

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0