SPContext.GetContext 方法 (HttpContext)

返回指定的 HTTP 上下文的Microsoft SharePoint Foundation上下文。

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

语法

声明
Public Shared Function GetContext ( _
    context As HttpContext _
) As SPContext
用法
Dim context As HttpContext
Dim returnValue As SPContext

returnValue = SPContext.GetContext(context)
public static SPContext GetContext(
    HttpContext context
)

参数

  • context
    类型:System.Web.HttpContext

    System.Web.HTTPContext对象,该对象封装服务器用于处理网站请求的 HTTP 特定上下文。

返回值

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

另请参阅

引用

SPContext 类

SPContext 成员

GetContext 重载

Microsoft.SharePoint 命名空间