SPEncode.WriteUrlEncode method
Encodes the specified string, converting special characters to quoted UTF-8 format, and writes the string to the HTTP output content stream.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Sub WriteUrlEncode ( _
response As HttpResponse, _
str As String _
)
'Usage
Dim response As HttpResponse
Dim str As StringSPEncode.WriteUrlEncode(response, str)
public static void WriteUrlEncode(
HttpResponse response,
string str
)
Parameters
response
Type: System.Web.HttpResponseThe System.HttpResponse object for the current HTTP request.
str
Type: System.StringThe string to encode.
Remarks
The WriteUrlEncode method converts "https://msdn.microsoft.com" to "http%3A%2F%2Fmsdn%2Emicrosoft%2Ecom".