Tuesday, March 27, 2012

sharepoint get username javascript

Below is the code snippet to get the current login user name in web part or you can use Client object model..

var sLoginUserName ="";


if(document.getElementById('ctl00_LoginCtrl')!=null)
sLoginUserName =document.getElementById('ctl00_LoginCtrl').innerText;




No comments:

Post a Comment