Tagged Questions

Represents the context of an HTTP request in Microsoft SharePoint Foundation.

learn more… | top users | synonyms

0
votes
3answers
645 views

SPContext returns wrong user account [closed]

I'm creating a web part on a non local server and I need to get the current user logged in to SharePoint. I'm using the following code to get the username. string currentUser = ...
11
votes
3answers
2k views

Should I dispose these SPSite and SPWeb objects?

Is it necessary to dispose the site and web objects in the following code? If so, how do I do this? Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load Dim site ...