I need to assign the current user to the people picker control in my ASPX page
which I am planing to host in sharepoint (WSS) .
I was trying on these lines but without success.
System.Collections.ArrayList entityArrayList =
new System.Collections.ArrayList();
PickerEntity entity = new PickerEntity();
userPicker = new PeopleEditor();
userPicker.MultiSelect = false;
entity.Key =
SPContext.Current.Web.CurrentUser.LoginName;
entity= userPicker.ValidateEntity(entity);
entityArrayList.Add(entity.Key);
userPicker.UpdateEntities(entityArrayList);
It is throwing type casting exception.did tried with all the rules of the book
but nothing worked!