共用方式為


SPContext.GetContext method (HttpContext, Guid, Guid, SPWeb)

傳回檢視的Microsoft SharePoint Foundation內容。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Shared Function GetContext ( _
    context As HttpContext, _
    viewId As Guid, _
    listId As Guid, _
    web As SPWeb _
) As SPContext
'用途
Dim context As HttpContext
Dim viewId As Guid
Dim listId As Guid
Dim web As SPWeb
Dim returnValue As SPContext

returnValue = SPContext.GetContext(context, _
    viewId, listId, web)
public static SPContext GetContext(
    HttpContext context,
    Guid viewId,
    Guid listId,
    SPWeb web
)

參數

  • context
    Type: System.Web.HttpContext

    System.Web.HTTPContext物件,它可封裝由伺服器用來處理站台要求的 HTTP 特有內容。

  • viewId
    Type: System.Guid

    System.Guid可識別檢視。

  • listId
    Type: System.Guid

    System.Guid用來識別清單。

傳回值

Type: Microsoft.SharePoint.SPContext
SharePoint Foundation內容中。

請參閱

參照

SPContext class

SPContext members

GetContext overload

Microsoft.SharePoint namespace