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

Comments

Popular posts from this blog

Upload Single/Multiple file by using the REST API and jQuery SharePoint 2013

Add content type to SharePoint List/Library using REST API

A type named 'SP.Data. could not be resolved by the model error