Export (0) Print
Expand All

SPContext.GetContext Method (HttpContext, Int32, Guid, SPWeb)

Returns the Microsoft SharePoint Foundation context for a list item.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

public static SPContext GetContext(
	HttpContext context,
	int itemId,
	Guid listId,
	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.

itemId
Type: System.Int32

A 32-bit integer that identifies the item.

listId
Type: System.Guid

A System.Guid that identifies the list.

web
Type: Microsoft.SharePoint.SPWeb

The Web site.

Return Value

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