SPUtility.ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls method (String, Boolean)
將指定的相對 URL 與內嵌的前置字元轉換成伺服器相對 URL,並選擇性地將編碼站台首碼。
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
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
Type: System.String伺服器相對 URL。
ecmaScriptStringLiteralEncode
Type: System.Boolean要編碼的站台首碼 ; true否則,請false。
傳回值
Type: System.String
會傳回伺服器相對 URL String表示。
備註
此方法將轉換成具有前置詞的 URL"~ 網站 /"或"~sitecollection/"伺服器相對 url。