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)
Syntax
'Declaration
Public Shared Function GetContext ( _
context As HttpContext, _
itemId As String, _
listId As Guid, _
web As SPWeb _
) As SPContext
'Usage
Dim context As HttpContext
Dim itemId As String
Dim listId As Guid
Dim web As SPWeb
Dim returnValue As SPContext
returnValue = SPContext.GetContext(context, _
itemId, listId, web)
public static SPContext GetContext(
HttpContext context,
string itemId,
Guid listId,
SPWeb web
)
Parameters
- context
Type: System.Web.HttpContext
itemId
Type: System.StringA 32-bit integer that identifies the item.
listId
Type: System.GuidA System.Guid that identifies the list.
web
Type: Microsoft.SharePoint.SPWebThe Web site.
Return value
Type: Microsoft.SharePoint.SPContext
The SharePoint Foundation context.