SPContext.GetContext method (HttpContext, Int32, Type)
傳回的Microsoft SharePoint Foundation內容,使用指定的 HTTP 內容、 項目 ID 和項目類型的項目。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Shared Function GetContext ( _
context As HttpContext, _
itemId As Integer, _
itemType As Type _
) As SPContext
'用途
Dim context As HttpContext
Dim itemId As Integer
Dim itemType As Type
Dim returnValue As SPContext
returnValue = SPContext.GetContext(context, _
itemId, itemType)
public static SPContext GetContext(
HttpContext context,
int itemId,
Type itemType
)
參數
context
Type: System.Web.HttpContextSystem.Web.HTTPContext物件,它可封裝由伺服器用來處理站台要求的 HTTP 特有內容。
itemId
Type: System.Int32識別項目為 32 位元整數。
itemType
Type: System.TypeSystem.Type ,表示項目類型。
傳回值
Type: Microsoft.SharePoint.SPContext
SharePoint Foundation內容中。