HttpEncoder.UrlEncode Method (Byte, Int32, Int32)
Encodes an array of characters that are not allowed in a URL into a hexadecimal character-entity equivalent.
Assembly: System.Web (in System.Web.dll)
An array of bytes to encode.
The position in the bytes array at which to begin encoding.
The number of items in the bytes array to encode.
Return ValueType: System.Byte
An array of encoded characters.
The HttpUtility class.method is called by several URL encoding methods in the
Themethod URL-encodes any character that is not in the set of ASCII characters that is considered to be URL-safe. Spaces are encoded as the ASCII "+" character. URL-safe ASCII characters include the ASCI characters (A to Z and a to z), numerals (0 to 9), and some punctuation marks. The following table lists the punctuation marks that are considered URL-safe ASCII characters.
Available since 4.0