I have create a SharePoint 2013 peoplepicker field in an application page and want to show the SharePoint group only..
code: C#
using (SPSite site = new SPSite("http://site/subsite"))
{
SPUser user = null;
ArrayList resolvedEntities = peoplePicker.ResolvedEntities;
foreach (PickerEntity entity in resolvedEntities)
{
string loginName = entity.Key;
user = site.RootWeb.EnsureUser(loginName);
break;
}
}
ASPX:
<SharePoint:ClientPeoplePicker
Required="true"
ValidationEnabled="true"
ID="peoplePicker"
runat="server"
InitialHelpText="<%$Resources:wss,aclinv_PickerIntialHelperText%>"
VisibleSuggestions="3"
Rows="1"
AllowMultipleEntities="false"
CssClass="ms-long ms-spellcheck-true" />
Also, how to modify it to enable multi-selection?