XhtmlTextWriter.XhtmlTextWriter(TextWriter, String) Constructor

Initializes a new instance of the XhtmlTextWriter class with the specified line indentation.

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

public:
XhtmlTextWriter (
	TextWriter^ writer, 
	String^ tabString
)
public XhtmlTextWriter (
	TextWriter writer, 
	String tabString
)
public function XhtmlTextWriter (
	writer : TextWriter, 
	tabString : String
)
Not applicable.

Parameters

writer

A TextWriter instance that renders the XHTML content.

tabString

The string used to render a line indentation.

The following code example demonstrates how to create the two constructors, which is standard for all classes that derive directly or indirectly from the HtmlTextWriter class, for a custom class that is derived from the XhtmlTextWriter class.

No code example is currently available or this language may not be supported.
// Create a class that inherits from XhtmlTextWriter.
/** @attribute AspNetHostingPermission(SecurityAction.Demand, 
    Level = AspNetHostingPermissionLevel.Minimal)
 */
/** @attribute AspNetHostingPermission(SecurityAction.InheritanceDemand,
    Level = AspNetHostingPermissionLevel.Minimal)
 */
public class CustomXhtmlTextWriter extends XhtmlTextWriter
{
    // Create two constructors, following 
    // the pattern for implementing a
    // TextWriter constructor.
    public CustomXhtmlTextWriter(TextWriter writer)
    {
         this(writer, DefaultTabString);
    } //CustomXhtmlTextWriter

    public CustomXhtmlTextWriter(TextWriter writer, String tabString)
    {
         super(writer, tabString);
    } //CustomXhtmlTextWriter

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: