Monday, June 17, 2013

Get data from People Picker(ClientPeoplePicker) through code

There is a new control in sharepoint 2013 named ClientPeoplePicker.Which is a very good control loads the user prediction on the client side using a hidden div .


To get the data from this control on the server side use the code below


string a = "";

ArrayList resolve = pepPickcker.ResolvedEntities;
foreach (PickerEntity entity in resolve){
a += entity.Key+";";   //Key will give you the login name you can use other attributes}


*pepPickcker is the control ID


No comments:

Post a Comment