sharepoint get current user login name using c# (Server Object Model) :

SHAREPOINT GET CURRENT USER LOGIN NAME USING C# (SERVER OBJECT MODEL) :


      You Can get the current logged in user name usin the following code
          
          string name = SPContext.Current.Web.CurrentUser.LoginName;
        (before that you have to use this namespace  using Microsoft.SharePoint;)

To get current user in client object model see this link

No comments:

Post a Comment