Export (0) Print
Expand All

SPUtility.ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls method (String, Boolean)

Converts the specified relative URL with an embedded prefix to a server-relative URL and optionally encodes the site prefix.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static string ReplaceEmbeddedPrefixedUrlsWithServerRelativeUrls(
	string value,
	bool ecmaScriptStringLiteralEncode
)

Parameters

value
Type: System.String

The server-relative URL.

ecmaScriptStringLiteralEncode
Type: System.Boolean

true to encode the site prefix; otherwise, false.

Return value

Type: System.String
Returns a String representation of the server-relative URL.

This method converts a URL with the prefix "~site/" or "~sitecollection/" to a server-relative URL.

Show:
© 2014 Microsoft