System.Web.UI.HtmlTextWriter.EncodeUrl Method

Performs minimal URL encoding by converting spaces in the specified URL to the string "%20".

Syntax

protected string EncodeUrl (string url)

Parameters

url
A string containing the URL to encode.

Returns

A string containing the encoded URL.

Remarks

URL encoding of a character consists of a percent symbol (%), followed by the two-digit hexadecimal representation (case-insensitive) of the ISO-Latin code point for the character. The hexadecimal representation of a space is 20.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0