Saturday, April 24, 2010

How to get a value of people picker editor control

If the values are not saving in the sharepoint list with the values entered using PeopleEditor control, or if an exception is throwing like “value or property may be read only or value does not fall ….. “ we can achieve this like following.

1. take any string array
2. using a property CommaSeparatedAccounts split this people editor control and assign to string array.
3. from that string array using foreach loop get the string.
4. pass this string as argument to EnsureUser method for web object and assign it to SPUser class object.
5. From this SPUser class object get the propeties.

No comments:

Post a Comment