This documentation is archived and is not being maintained.
HtmlTextWriterStyle Enumeration
Visual Studio 2010
Specifies the HTML styles available to an HtmlTextWriter or Html32TextWriter object output stream.
Assembly: System.Web (in System.Web.dll)
| 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 fontheight style. | |
| Height | Specifies the HTML height style. | |
| TextDecoration | Specifies the HTML textdecoration style. | |
| Width | Specifies the HTML width style. | |
| ListStyleImage | Specifies the HTML liststyleimage style. | |
| ListStyleType | Specifies the HTML liststyletype style. | |
| Cursor | Specifies the HTML cursor style. | |
| Direction | Specifies the HTML direction style. | |
| Display | Specifies the HTML display style. | |
| Filter | Specifies the HTML filter style. | |
| FontVariant | Specifies the HTML fontvariant style. | |
| Left | Specifies the HTML left style. | |
| Margin | Specifies the HTML margin style. | |
| MarginBottom | Specifies the HTML marginbottom style. | |
| MarginLeft | Specifies the HTML marginleft style. | |
| MarginRight | Specifies the HTML marginright style. | |
| MarginTop | Specifies the HTML margintop style. | |
| Overflow | Specifies the HTML overflow style. | |
| OverflowX | Specifies the HTML overflowx style. | |
| OverflowY | Specifies the HTML overflowy style. | |
| Padding | Specifies the HTML padding style. | |
| PaddingBottom | Specifies the HTML paddingbottom style. | |
| PaddingLeft | Specifies the HTML paddingleft style. | |
| PaddingRight | Specifies the HTML paddingright style. | |
| PaddingTop | Specifies the HTML paddingtop style. | |
| Position | Specifies the HTML position style. | |
| TextAlign | Specifies the HTML textalign style. | |
| VerticalAlign | Specifies the HTML verticalalign style. | |
| TextOverflow | Specifies the HTML textoverflow style. | |
| Top | Specifies the HTML top style. | |
| Visibility | Specifies the HTML visibility style. | |
| WhiteSpace | Specifies the HTML whitespace style. | |
| ZIndex | Specifies the HTML zindex style. |
HtmlTextWriter and Html32TextWriter objects use these enumeration values to register HTML strings to the proper HTML style.
The following example uses the HtmlTextWriterStyle enumeration with the AddStyleAttribute method to add a color style attribute to an HTML element and sets its value.
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.
Show: