SPContext.GetContext method (HttpContext, String, Guid, SPWeb)
傳回的Microsoft SharePoint Foundation內容,使用指定的項目 ID、 清單識別碼和網站的項目。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function GetContext ( _
context As HttpContext, _
itemId As String, _
listId As Guid, _
web As SPWeb _
) As SPContext
'用途
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
)
參數
- context
Type: System.Web.HttpContext
itemId
Type: System.String識別項目為 32 位元整數。
listId
Type: System.GuidSystem.Guid用來識別清單。
web
Type: Microsoft.SharePoint.SPWeb網站。
傳回值
Type: Microsoft.SharePoint.SPContext
SharePoint Foundation內容中。