System.Web.Security.Roles.RoleExists Method

Gets a value indicating whether the specified role name already exists in the role data source.

Syntax

public static bool RoleExists (string rolename)

Parameters

rolename
Documentation for this section has not yet been entered.

Returns

true if the role name already exists in the data source; otherwise, false.

Remarks

The Roles.RoleExists(string) method calls the RoleExists method of the default role provider to determine whether a role name exists in the data source for the application that is specified in the Roles.ApplicationName property.

Requirements

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