What's the best way to determine the current user within a custom web part developed for MOSS 2007? I've found four solutions so far, but I'm pretty sure there are more:
1. Use System.Web.HttpContext.Current.User.Identity.Name, like in any ASP.Net web application
2. Use System.Security.Principal.WindowsIdentity.GetCurrent().Name
3. Have the Current User Filter send the current user to your web part, and (of course) make your web part a consumer of that value.
4. SPWeb web = SPControl.GetContextWeb(Context); SPUser currentUser = web.CurrentUser;
SharePoint home sites: a landing for your organization on the intelligent intranet
Visionaries driving digital transformation and creating the modern workplace know the intelligent intranet is the heart of a digital workp...

-
I had a recent assignment to test the performance of a List. The list was behaving really slow and I need to determine the total number of...
-
Have you ever had a scenario where you had to create a custom list and then you should only show items in the list which the user is suppo...
-
I been asked to create a scrolling announcement for one of my SharePoint 2010 website and thought it was straight forward however googlin...
