This documentation is archived and is not being maintained.

HtmlTextWriterStyle Enumeration

Specifies the HTML styles available to an HtmlTextWriter or Html32TextWriter object output stream.

[Visual Basic]
Public Enum HtmlTextWriterStyle
public enum HtmlTextWriterStyle
__value public enum HtmlTextWriterStyle
enum HtmlTextWriterStyle


HtmlTextWriter and Html32TextWriter objects use these enumeration values to register HTML strings to the proper HTML style.


Member name Description
BackgroundColor Specifies the HTML backgroundcolor style.
BackgroundImage Specifies the HTML backgroundimage style.
BorderCollapse Specifies the HTML bordercollapse style.
BorderColor Specifies the HTML bordercolor style.
BorderStyle Specifies the HTML borderstyle style.
BorderWidth Specifies the HTML borderwidth style.
Color Specifies the HTML color style.
FontFamily Specifies the HTML fontfamily style.
FontSize Specifies the HTML fontsize style.
FontStyle Specifies the HTML fontstyle style.
FontWeight Specifies the HTML fontweight style.
Height Specifies the HTML height style.
TextDecoration Specifies the HTML textdecoration style.
Width Specifies the HTML width style.


[Visual Basic] 
writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "Red")

writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "Red");

writer->AddStyleAttribute(HtmlTextWriterStyle::Color, S"Red");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.Web.UI

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

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

See Also

System.Web.UI Namespace | HtmlTextWriter