System.Web.Security.SqlRoleProvider.GetRolesForUser Method

Gets a list of the roles that a user is in.

Syntax

public override string[] GetRolesForUser (string username)

Parameters

username
The user to return a list of roles for.

Returns

A string array containing the names of all the roles that the specified user is in.

Remarks

The SqlRoleProvider.GetRolesForUser(string) method is called by the System.Web.Security.Roles class to retrieve a list of a specified user's roles from 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