SPPrefixCollection.FindSiteRoot 方法

在与相对于服务器的请求 url 的开头匹配的前缀为该集合中查找。

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

语法

声明
Public Function FindSiteRoot ( _
    serverRelativeRequestPath As String, _
    <OutAttribute> ByRef matchedPrefix As SPPrefix _
) As String
用法
Dim instance As SPPrefixCollection
Dim serverRelativeRequestPath As String
Dim matchedPrefix As SPPrefix
Dim returnValue As String

returnValue = instance.FindSiteRoot(serverRelativeRequestPath, _
    matchedPrefix)
public string FindSiteRoot(
    string serverRelativeRequestPath,
    out SPPrefix matchedPrefix
)

参数

  • serverRelativeRequestPath
    类型:System.String

    相对于服务器的请求 url 中。

返回值

类型:System.String
表示站点,则为 null,如果找不到任何匹配的服务器相对请求 url 的一部分。

另请参阅

引用

SPPrefixCollection 类

SPPrefixCollection 成员

Microsoft.SharePoint.Administration 命名空间