共用方式為


UserGroup.RemoveRole Method

Removes the specified role definition from the current Web site.

Namespace:  [UserGroup Web service]
Web service reference: http://Site/_vti_bin/UserGroup.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemoveRole", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/directory/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Sub RemoveRole ( _
    roleName As String _
)
'Usage
Dim instance As UserGroup
Dim roleName As String

instance.RemoveRole(roleName)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/directory/RemoveRole", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/directory/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public void RemoveRole(
    string roleName
)

Parameters

  • roleName
    Type: System.String

    A string that contains the name of the role definition.

Examples

The following code example removes the specified role definition from the current Web site.

Dim usrgrpService As New Web_Reference_Folder_Name.UserGroup()
usrgrpService.Credentials = System.Net.CredentialCache.DefaultCredentials

usrgrpService.RemoveRole("Group_Name")
Web_Reference_Folder_Name.UserGroup usrgrpService = new Web_Reference_Folder_Name.UserGroup();
usrgrpService.Credentials= System.Net.CredentialCache.DefaultCredentials;

usrgrpService.RemoveRole("Group_Name");

See Also

Reference

UserGroup Class

UserGroup Members

UserGroup Web Service