PeopleEditor.AccountType Enumeration
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
- 3/31/2008
- Content Master Ltd
no description about members eg DL, etc
Presumably DL = AD distribution list
SecGroup = AD security group
SPGroup = Sharepoint group
and user = single user
- 2/20/2007
- vijay yande - guru
- 2/21/2007
- Nick Cox