HttpUtility.UrlEncode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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. |