Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the Microsoft SharePoint Foundation context for the specified HTTP context.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Function GetContext ( _
context As HttpContext _
) As SPContext
'Usage
Dim context As HttpContext
Dim returnValue As SPContext
returnValue = SPContext.GetContext(context)
public static SPContext GetContext(
HttpContext context
)
Parameters
context
Type: System.Web.HttpContextA System.Web.HTTPContext object that encapsulates the HTTP-specific context that is used by the server to process site requests.
Return Value
Type: Microsoft.SharePoint.SPContext
The SharePoint Foundation context.