Business Intelligence guy here jumping into SharePoint Web Part development after a long, long time off.
I need to return identity of the logged in user ala “Domain\UserName” inside the web part I’ve completed. I see
SPContext.Current.Web.CurrentUser.LoginName()
But it appears this sucker returns the Full Name of the user – “John Q. Public”.
What namespace / method is best to use in a 3.5-based web part to return Domain\UserName, or even better, just UserName?
Thanks!
HttpContext.Current.User.Identity.Nameworks in asp.net.