System.Web.Security.Roles.DeleteRole Method

Removes a role from the data source.

Syntax

public static bool DeleteRole (string rolename)

Parameters

rolename
Documentation for this section has not yet been entered.

Returns

true if roleName was deleted from the data source; otherwise, false.

Remarks

The Roles.DeleteRole(string) method removes a role name from the data source. Roles.DeleteRole(string) calls the RoleProvider.DeleteRole(string, bool) method of the default role provider to remove the specified role from the data source.

If the role identified by the roleName parameter has one or more members, then an exception will be thrown and the role will not be deleted.

Requirements

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