SPUtility.ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls 方法 (String, Boolean)

将嵌入的前缀与指定的相对 URL 转换为相对于服务器的 URL 和 (可选) 将编码的站点前缀。

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

语法

声明
Public Shared Function ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls ( _
    value As String, _
    ecmaScriptStringLiteralEncode As Boolean _
) As String
用法
Dim value As String
Dim ecmaScriptStringLiteralEncode As Boolean
Dim returnValue As String

returnValue = SPUtility.ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls(value, _
    ecmaScriptStringLiteralEncode)
public static string ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls(
    string value,
    bool ecmaScriptStringLiteralEncode
)

参数

  • ecmaScriptStringLiteralEncode
    类型:System.Boolean

    true要编码的站点前缀 ;否则为false。

返回值

类型:System.String
返回String表示形式的相对于服务器的 URL。

备注

此方法会将 URL 前缀"~ 网站 /"或"~sitecollection/"相对于服务器的 url。

另请参阅

引用

SPUtility 类

SPUtility 成员

ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls 重载

Microsoft.SharePoint.Utilities 命名空间