This documentation is archived and is not being maintained.

SPContext.GetContext Method (HttpContext, SPItem, SPWeb)

Windows SharePoint Services 3

Returns the Windows SharePoint Services context for an item that is not list-based using the specified HTTP context, item, and site.

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

public static SPContext GetContext(
	HttpContext context,
	SPItem item,
	SPWeb web


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.
Type: Microsoft.SharePoint.SPItem
An SPItem object that represents the item.
Type: Microsoft.SharePoint.SPWeb
An SPWeb object that represents the Web site.

Return Value

Type: Microsoft.SharePoint.SPContext
An SPContext object that represents the Windows SharePoint Services context.