SPEncode.UrlEncodeAsUrl method (String)
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)
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 ("/").