HtmlTextWriter::AddStyleAttribute Method (String, String, HtmlTextWriterStyle)
Adds the specified markup style attribute and the attribute value, along with an HtmlTextWriterStyle enumeration value, to the opening markup tag created by a subsequent call to the RenderBeginTag method.
Assembly: System.Web (in System.Web.dll)
protected: virtual void AddStyleAttribute( String^ name, String^ value, HtmlTextWriterStyle key )
Parameters
- name
- Type: System::String
A string that contains the style attribute to be added.
- value
- Type: System::String
A string that contains the value to assign to the attribute.
- key
- Type: System.Web.UI::HtmlTextWriterStyle
An HtmlTextWriterStyle that represents the style attribute to add.
Use the AddStyleAttribute overload of the AddStyleAttribute(String, String, HtmlTextWriterStyle) method only when inheriting from the HtmlTextWriter class. It enables you to create new name and value pairs for HtmlTextWriterStyle attributes.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.