Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Encodes the specified string, converting special characters to quoted UTF-8 format, but assumes that the string is a path component of a URL.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Shared Function UrlEncodeAsUrl ( _
str As String _
) As String
'Usage
Dim str As String
Dim returnValue As String
returnValue = SPEncode.UrlEncodeAsUrl(str)
public static string UrlEncodeAsUrl(
string str
)
Parameters
str
Type: System.StringThe string to encode as a URL.
Return Value
Type: System.String
The encoded string.
Remarks
Unlike the UrlEncode method, the UrlEncodeAsUrl method does not encode the forward slash ("/").