将嵌入的前缀与指定的相对 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
)
参数
value
类型:System.String相对于服务器的 URL。
ecmaScriptStringLiteralEncode
类型:System.Booleantrue要编码的站点前缀 ;否则为false。
返回值
类型:System.String
返回String表示形式的相对于服务器的 URL。
备注
此方法会将 URL 前缀"~ 网站 /"或"~sitecollection/"相对于服务器的 url。