ChtmlTextWriter Constructor (TextWriter, String)
Initializes a new instance of the ChtmlTextWriter class with the specified line indentation.
Assembly: System.Web (in System.Web.dll)
Parameters
- writer
- Type: System.IO::TextWriter
The TextWriter that renders the markup content.
- tabString
- Type: System::String
The number of spaces defined in the Indent.
The ChtmlTextWriter constructor, which takes both an instance of the TextWriter class and a string as parameters, calls the Html32TextWriter constructor that takes the same parameters when it creates an instance of the ChtmlTextWriter class.
The following code example demonstrates how to create a custom class named CustomChtmlTextWriter that is derived from the ChtmlTextWriter class. It creates two constructors that you can use to create an instance of the custom class with the same pattern as all classes that derive, directly or indirectly, from the HtmlTextWriter class.
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.