protected string getUserEmail( int lookupid) { String Useremail = string .Empty; try { using (ClientContext clientContext = new ClientContext(siteUrl)) { Microsoft.SharePoint.Client.ListItem userInfo = clientContext.Web.SiteUserInfoList.GetItemById(lookupid); clientContext.Load(userInfo); clientContext.ExecuteQuery(); Useremail = userInfo[ "EMail" ].ToString(); } } catch (Exception ex) { // TODO: // handle the error } return Useremail; }
MELICK RAJEE BARANASOORIYA | Enterprise Architect