To be able to grab the current user in SharePoint, you would use:
So, in order to assign it to a variable in your code, you would do something similar to this:
VB.Net: Dim sME As String = SPContext.Current.Web.CurrentUser.ToString
C#: string sME = SPContext.Current.Web.CurrentUser.ToString;
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF
Leave a reply
You must be logged in to post a comment.