SPContext.GetContext method (HttpContext, SPItem, SPWeb)

Returns the Microsoft SharePoint Foundation context for an item using the specified HTTP context, item, and Web site.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetContext ( _
    context As HttpContext, _
    item As SPItem, _
    web As SPWeb _
) As SPContext
'Usage
Dim context As HttpContext
Dim item As SPItem
Dim web As SPWeb
Dim returnValue As SPContext

returnValue = SPContext.GetContext(context, _
    item, web)
public static SPContext GetContext(
    HttpContext context,
    SPItem item,
    SPWeb web
)

Parameters

  • context
    Type: System.Web.HttpContext

    A 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.

See also

Reference

SPContext class

SPContext members

GetContext overload

Microsoft.SharePoint namespace