Getting SharePoint User's Profiles
SPSecurity.RunWithElevatedPrivileges(delegate() { try { using (SPSite oSite = new SPSite(SPContext.Current.Site.ID, SPContext.Current.Site.SystemAccount.UserToken)) { SPServiceContext context = SPServiceContext.GetContext(oSite); UserProfileManager myProfileManager = new UserProfileManager(context); string CurrentUser = SPContext.Current.Web.CurrentUser.LoginName; UserProfile myProfile = myProfileManager.GetUserProfile(CurrentUser); dt.Rows.Add(Convert.ToString(myProfile["FirstName"].Value), Convert.ToString(myProfile["Department"].Value)); //dt.Rows.Add(Convert.ToString(myProfile["LastName"].Value), Convert.ToString(myProfile["FirstName"].Value), Convert.ToString(myProfile["Department"].Value), Conv