HttpServerUtilityWrapper.HtmlEncode Method (String, TextWriter)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

HTML-encodes a string and sends the resulting output to an output stream.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

public override void HtmlEncode(
	string s,
	TextWriter output


Type: System.String

The string to encode.

Type: System.IO.TextWriter

The stream to contain the encoded string.

The output parameter is passed by reference to the HtmlEncode method. To retrieve the output from the handler after the method completes, you use the properties and methods of the output object. For an example, see HtmlEncode.

.NET Framework
Available since 3.5
Return to top