HttpUtility.UrlEncode Method

Definition

Encodes a URL string. These method overloads can be used to encode the entire URL, including query-string values.

To encode or decode values outside of a web application, use the WebUtility class.

Overloads

Name Description
UrlEncode(Byte[], Int32, Int32)

Converts a byte array into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes.

UrlEncode(String, Encoding)

Encodes a URL string using the specified encoding object.