This documentation is archived and is not being maintained.
HttpUtility Class
Visual Studio 2010
Provides methods for encoding and decoding URLs when processing Web requests. This class cannot be inherited.
Assembly: System.Web (in System.Web.dll)
The HttpUtility type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | HtmlAttributeEncode(String) | Minimally converts a string to an HTML-encoded string. |
![]() ![]() | HtmlAttributeEncode(String, TextWriter) | Minimally converts a string into an HTML-encoded string and sends the encoded string to a TextWriter output stream. |
![]() ![]() | HtmlDecode(String) | Converts a string that has been HTML-encoded for HTTP transmission into a decoded string. |
![]() ![]() | HtmlDecode(String, TextWriter) | Converts a string that has been HTML-encoded into a decoded string, and sends the decoded string to a TextWriter output stream. |
![]() ![]() | HtmlEncode(Object) | Converts an object's string representation into an HTML-encoded string, and returns the encoded string. |
![]() ![]() | HtmlEncode(String) | Converts a string to an HTML-encoded string. |
![]() ![]() | HtmlEncode(String, TextWriter) | Converts a string into an HTML-encoded string, and returns the output as a TextWriter stream of output. |
![]() ![]() | JavaScriptStringEncode(String) | Encodes a string. |
![]() ![]() | JavaScriptStringEncode(String, Boolean) | Encodes a string. |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() ![]() | ParseQueryString(String) | Parses a query string into a NameValueCollection using UTF8 encoding. |
![]() ![]() | ParseQueryString(String, Encoding) | Parses a query string into a NameValueCollection using the specified Encoding. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() ![]() | UrlDecode(String) | Converts a string that has been encoded for transmission in a URL into a decoded string. |
![]() ![]() | UrlDecode(array<Byte>, Encoding) | Converts a URL-encoded byte array into a decoded string using the specified decoding object. |
![]() ![]() | UrlDecode(String, Encoding) | Converts a URL-encoded string into a decoded string, using the specified encoding object. |
![]() ![]() | UrlDecode(array<Byte>, Int32, Int32, Encoding) | Converts a URL-encoded byte array into a decoded string using the specified encoding object, starting at the specified position in the array, and continuing for the specified number of bytes. |
![]() ![]() | UrlDecodeToBytes(array<Byte>) | Converts a URL-encoded array of bytes into a decoded array of bytes. |
![]() ![]() | UrlDecodeToBytes(String) | Converts a URL-encoded string into a decoded array of bytes. |
![]() ![]() | UrlDecodeToBytes(String, Encoding) | Converts a URL-encoded string into a decoded array of bytes using the specified decoding object. |
![]() ![]() | UrlDecodeToBytes(array<Byte>, Int32, Int32) | Converts a URL-encoded array of bytes into a decoded array of bytes, starting at the specified position in the array and continuing for the specified number of bytes. |
![]() ![]() | UrlEncode(array<Byte>) | Converts a byte array into an encoded URL string. |
![]() ![]() | UrlEncode(String) | Encodes a URL string. |
![]() ![]() | UrlEncode(String, Encoding) | Encodes a URL string using the specified encoding object. |
![]() ![]() | UrlEncode(array<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. |
![]() ![]() | UrlEncodeToBytes(array<Byte>) | Converts an array of bytes into a URL-encoded array of bytes. |
![]() ![]() | UrlEncodeToBytes(String) | Converts a string into a URL-encoded array of bytes. |
![]() ![]() | UrlEncodeToBytes(String, Encoding) | Converts a string into a URL-encoded array of bytes using the specified encoding object. |
![]() ![]() | UrlEncodeToBytes(array<Byte>, Int32, Int32) | 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. |
![]() ![]() | UrlEncodeUnicode | Converts a string into a Unicode string. |
![]() ![]() | UrlEncodeUnicodeToBytes | Converts a Unicode string into an array of bytes. |
![]() ![]() | UrlPathEncode | Encodes the path portion of a URL string for reliable HTTP transmission from the Web server to a client. |
The HttpUtility class is used internally by the HttpServerUtility class, whose methods and properties are exposed through the intrinsic ASP.NET Server object. Additionally, the HttpUtility class contains encoding and decoding utility methods that are not accessible from the Server.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:


