This documentation is archived and is not being maintained.

HttpUtility.UrlEncodeToBytes Method

Converts a string or a byte array into an encoded array of bytes for reliable HTTP transmission from the Web server to a client.

Overload List

Converts an array of bytes into a URL-encoded array of bytes.

[Visual Basic] Overloads Public Shared Function UrlEncodeToBytes(Byte()) As Byte()
[C#] public static byte[] UrlEncodeToBytes(byte[]);
[C++] public: static unsigned char UrlEncodeToBytes(unsigned char __gc[]) __gc[];
[JScript] public static function UrlEncodeToBytes(Byte[]) : Byte[];

Converts a string into a URL-encoded array of bytes .

[Visual Basic] Overloads Public Shared Function UrlEncodeToBytes(String) As Byte()
[C#] public static byte[] UrlEncodeToBytes(string);
[C++] public: static unsigned char UrlEncodeToBytes(String*) __gc[];
[JScript] public static function UrlEncodeToBytes(String) : Byte[];

Converts a string into a URL-encoded array of bytes, using the specified encoding object.

[Visual Basic] Overloads Public Shared Function UrlEncodeToBytes(String, Encoding) As Byte()
[C#] public static byte[] UrlEncodeToBytes(string, Encoding);
[C++] public: static unsigned char UrlEncodeToBytes(String*, Encoding*) __gc[];
[JScript] public static function UrlEncodeToBytes(String, Encoding) : Byte[];

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

[Visual Basic] Overloads Public Shared Function UrlEncodeToBytes(Byte(), Integer, Integer) As Byte()
[C#] public static byte[] UrlEncodeToBytes(byte[], int, int);
[C++] public: static unsigned char UrlEncodeToBytes(unsigned char __gc[], int, int) __gc[];
[JScript] public static function UrlEncodeToBytes(Byte[], int, int) : Byte[];

See Also

HttpUtility Class | HttpUtility Members | System.Web Namespace

Show: