SPContext.GetContext 方法 (HttpContext, String, Guid, SPWeb)

返回使用指定的项 ID、 列表 ID 和网站项目的Microsoft SharePoint Foundation上下文。

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
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
)

参数

  • itemId
    类型:System.String

    一个 32 位整数,标识的项。

  • listId
    类型:System.Guid

    System.Guid标识列表。

返回值

类型:Microsoft.SharePoint.SPContext
SharePoint Foundation上下文中。

另请参阅

引用

SPContext 类

SPContext 成员

GetContext 重载

Microsoft.SharePoint 命名空间