Sometimes there are requirement to populate the current logged in user in People picker field.
I had tried to populate using PickerEntity class, but it use to fail on click of "Check Names" button. So changed the approch to se the comma seprated names and it worked.
1. Take the curent Logged user
loginName = SPContext.Current.Web.CurrentUser.LoginName
I had tried to populate using PickerEntity class, but it use to fail on click of "Check Names" button. So changed the approch to se the comma seprated names and it worked.
1. Take the curent Logged user
loginName = SPContext.Current.Web.CurrentUser.LoginName
2. Assign the login to picker control.
pkrControlName.CommaSeparatedAccounts =loginName
Note: You can have multiple comma serpated login names to populate multiple users in people picker field.