SharePoint: How To Deal With People Picker Sharepoint Control into your Custom Control


In Many Cases you need to make a control to pick up a user from your user management system – Active Directory – Database Membership and so on, PeopleEditor Control make this you will say how to use it in my custom development,look

1)  Add Refernce to your HTML

<%@ Register Tagprefix=”SP” Namespace=”Microsoft.SharePoint.WebControlsAssembly=”Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>

2) Use it in the right position into your design

SelectionSet=”User” />

3) Get Values from it into your code behind 

PickerEntity pe = (PickerEntity)userPicker.Entities[0];  //get the first user in list
string username = pe.Description; //get username of the selected user

string DisplayName = pe.DisplayText ; //get user display name first last….


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s