XhtmlTextWriter.XhtmlTextWriter(TextWriter, String) Constructor
.NET Framework 3.0
Initializes a new instance of the XhtmlTextWriter class with the specified line indentation.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
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.
// 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
Community Additions
ADD
Show: