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)
Available in Sandboxed Solutions: No

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.

item
Type: Microsoft.SharePoint.SPItem

An SPItem object that represents the item.

web
Type: Microsoft.SharePoint.SPWeb

The Web site.

Return Value

Type: Microsoft.SharePoint.SPContext
The SharePoint Foundation context.
Show: