HtmlTextWriter.InnerWriter Property

 
System_CAPS_noteNote

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

Gets or sets the text writer that writes the inner content of the markup element.

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

member InnerWriter : TextWriter with get, set

Property Value

Type: System.IO.TextWriter

A TextWriter that writes the inner markup content.

Inner markup content is the text found between the opening and closing tags of a markup language element.

If the InnerWriter property is set to a TextWriter object that is an instance of the HttpWriter class, this fact is noted and a separate reference is saved.

The following code example shows how to use a custom Web server control, derived from the WebControl class, that overrides the Render method. It uses the HtmlTextWriter class to write a <font> element. After it writes the opening tag of the element, it uses the InnerWriter property to write the string "<br> The time on the server:" and concatenates this string with the value of the DateTime.Now property.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: