Friday, August 8, 2008, 15:29 - SharePoint
Posted by Administrator
When you want to use the PeopleEditor control you need the correct refence in your custom SharePoint page.Posted by Administrator
<% @Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
Add a user to the picker (c#):
ArrayList list = new ArrayList();
list.Add(
new PickerEntity()
{
Key = @"DOMAIN\User"
}
);
userPicker.UpdateEntities(list); Retrieve selected user(s)(c#):
PickerEntity pe = (PickerEntity)userPicker.Entities[0]; string username = pe.Key; //or if the entities are resolved PickerEntity pe = (PickerEntity)userPicker.ResolvedEntities[0]; string username = pe.Key;
that's it
</tom>




( 2.8 / 826 )

Tom Van Gaever - Blog
Avatar






