This documentation is archived and is not being maintained.

HttpUtility.HtmlEncode Method

Converts a string into an HTML-encoded string for reliable HTTP transmission from the Web server to a client.

Overload List

Converts a string to an HTML-encoded string for reliable HTTP transmission from the Web server to a client.

[Visual Basic] Overloads Public Shared Function HtmlEncode(String) As String
[C#] public static string HtmlEncode(string);
[C++] public: static String* HtmlEncode(String*);
[JScript] public static function HtmlEncode(String) : String;

Converts a string into an HTML-encoded string, and returns the output as a TextWriter stream of output.

[Visual Basic] Overloads Public Shared Sub HtmlEncode(String, TextWriter)
[C#] public static void HtmlEncode(string, TextWriter);
[C++] public: static void HtmlEncode(String*, TextWriter*);
[JScript] public static function HtmlEncode(String, TextWriter);

See Also

HttpUtility Class | HttpUtility Members | System.Web Namespace

Show: