URL Decode

URL Decode:

Converts a string that has been encoded for transmission in a URL into a decoded string.

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

UrlDecode(String, Encoding);

Converts a URL-encoded string into a decoded string, using the specified encoding object.

Parameters:

                    

str
String

The string to decode.

e
Encoding

The Encoding specifies the decoding scheme.

Returns

          String

A decoded string.

Remarks;

Blanks and punctuation may be misunderstood at the receiving end if they are passed in an HTTP stream. URL encoding translates forbidden characters in URLs into character-entity counterparts; URL decoding reverses the encoding. The characters and >, for example, are encoded as%3c and%3e when inserted in a block of text to be delivered in a URL.

UrlDecode(Byte[], Int32, Int32, Encoding):

Converts a URL-encoded byte array into a decoded string, beginning at the specified position in the array and continuing for the specified number of bytes, using the supplied encoding object.

Parameters:

bytes;
 Byte[]

The array of bytes to decode.

offset;
 Int32

The position in the byte to begin decoding.

count;
 Int32

The number of bytes to decode.

e;
 Encoding

The Encoding object specifies the decoding scheme.

Returns;

                String

A decoded string.

Exceptions:

ArgumentNullException

bytes is null, but count does not equal 0.

ArgumentOutOfRangeException

offset is less than 0 or greater than the length of the bytes array.

-or-

count is less than 0, or count + offset is greater than the length of the bytes array.

Remarks:

Blanks and punctuation may be misunderstood at the receiving end if they are passed in an HTTP stream. URL encoding translates forbidden characters in URLs into character-entity counterparts; URL decoding reverses the encoding. For example, the letters and > are encoded as%3c and%3e when inserted in a block of text to be delivered in a URL.

Cookie
We care about your data and would love to use cookies to improve your experience.