SPEncode.UrlEncode method

Encodes the specified string, converting special characters to quoted UTF-8 format.

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

Syntax

'Declaration
Public Shared Function UrlEncode ( _
    str As String _
) As String
'Usage
Dim str As String
Dim returnValue As String

returnValue = SPEncode.UrlEncode(str)
public static string UrlEncode(
    string str
)

Parameters

Return value

Type: System.String
The encoded string.

Remarks

The UrlEncode method converts, for example, "http://msdn.microsoft.com" to "http%3A%2F%2Fmsdn%2Emicrosoft%2Ecom".

See also

Reference

SPEncode class

SPEncode members

Microsoft.SharePoint.Utilities namespace