Export (0) Print
Expand All

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

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

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

public static SPContext GetContext(
	HttpContext context,
	string itemId,
	Guid listId,
	SPWeb web
)

Parameters

context
Type: System.Web.HttpContext
itemId
Type: System.String

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