Tuesday, 30 August 2011

Retrieve data from User information list in Sharepoint


To Retrieve items from User information list in Sharepoint you can use
SPweb.SiteUserInforList.Items using your Sharepoint object model.

Example -

SPSite mySiteCollection = SPContext.Current.Site;
using (SPWeb web = mySiteCollection.OpenWeb())
{
SPListItemCollection userItems = web.SiteUserInfoList.Items;

String Email = userItems[0]["Email"].ToString;
}

Ads by Google

No comments:

Post a Comment