This topic has not yet been rated - Rate this topic

PeopleEditor.AccountType Enumeration

Windows SharePoint Services 3

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
public enum AccountType
  Member name Description
DL  
SecGroup  
SPGroup  
User  
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
PeopleEditor.AccountType

Description

The PeopleEditor.AccountType enumeration contains four values, DL, SecGroup, SPGroup, and User. You use the PeopleEditor.AccountType enumeration to restrict the acceptable values in a PeopleEditor control to Active Directory distribution lists, Active Directory security groups, SharePoint groups, or users.

To restrict the acceptable values in a PeopleEditor you must set the SelectionSet property of the PeopleEditor instance to the required value from the PeopleEditor.AccountType enumeration. The SelectionSet property of the PeopleEditor class is a String type. You must call the ToString method of the PeopleEditor.AccountType enumeration value to cast the enumeration value to a String type. If you want to specify multiple values from the PeopleEditor.AccountType enumeration you must separate each value with a comma.

Usage Scenarios

You would typically use the PeopleEditor.AccountType enumeration when you add a PeopleEditor control to a Web Part or Web form. For example, if the purpose of your Web Part is to send an e-mail to an Active Directory distribution list, you would specify the PeopleEditor.AccountType.DL enumeration value.

The following code samples show how to restrict the accepted values for a PeopleEditor object on a Web Part to Active Directory security groups.

C# Code Sample

protected override void CreateChildControls()
{
PeopleEditor pe = new PeopleEditor();
pe.SelectionSet = PeopleEditor.AccountType.SecGroup.ToString();
this.Controls.Add(pe);
}
  
protected override void Render(HtmlTextWriter writer)
{
RenderChildren(writer);
}

Visual Basic .NET Code Sample

Protected Overrides Sub CreateChildControls()
Dim pe As PeopleEditor = New PeopleEditor()
pe.SelectionSet = PeopleEditor.AccountType.SecGroup.ToString()
Me.Controls.Add(pe)
End Sub

Protected Overloads Overrides Sub Render(ByVal writer As HtmlTextWriter)
RenderChildren(writer)
End Sub
No description about DL, ...,...

no description about members eg DL, etc

 

Presumably DL = AD distribution list

SecGroup = AD security group

SPGroup = Sharepoint group

and user = single user