Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
SPWeb Class
SPWeb Methods
 CreateDefaultAssociatedGroups Metho...

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
SPWeb.CreateDefaultAssociatedGroups Method (Microsoft.SharePoint)
Creates the default security groups that are associated with a site.

Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Public Sub CreateDefaultAssociatedGroups ( _
    userLogin As String, _
    userLogin2 As String, _
    groupNameSeed As String _
)
Visual Basic (Usage)
Dim instance As SPWeb
Dim userLogin As String
Dim userLogin2 As String
Dim groupNameSeed As String

instance.CreateDefaultAssociatedGroups(userLogin, userLogin2, groupNameSeed)
C#
public void CreateDefaultAssociatedGroups (
    string userLogin,
    string userLogin2,
    string groupNameSeed
)

Parameters

userLogin

The account name of the primary administrator of the site.

userLogin2

The account name of the secondary administrator of the site.

groupNameSeed

The prefix for the names of groups in this site. If an empty string is passed, the prefix used is the site title.

The default security groups that are associated with a site are groupNameSeed Visitors, groupNameSeed Members, and groupNameSeed Owners. The user account names passed in the first two arguments are added to the Owners group.

An exception is thrown if the HasUniqueRoleAssignments property returns false, indicating that role assignments for this Web site are inherited from a parent Web site.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker