Export (0) Print
Expand All

ChtmlTextWriter.WriteEncodedText Method

Encodes the specified text for the requesting device, and then writes it to the output stream.

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

public override void WriteEncodedText(
	string text


Type: System.String

The text string to encode and write to the output stream.

If the text parameter passed into the WriteEncodedText method is null or has a length of zero, then nothing is written.

Use the WriteEncodedText method when a string contains angle brackets (< or >) or an ampersand (&) and you want to ensure that they are rendered correctly on the requesting device. 

The WriteEncodedText method uses the base class's WriteEncodedText method.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft