System.Web.UI.HtmlTextWriter.WriteStyleAttribute Method

Writes the specified style attribute and value to the output stream, and encodes the value, if specified.

Syntax

public virtual void WriteStyleAttribute (string name, string value, bool fEncode)

Parameters

name
The style attribute to write to the output stream.
value
The value assigned to the style attribute.
fEncode
true to encode the style attribute and its assigned value; otherwise, false.

Remarks

The HtmlTextWriter.WriteStyleAttribute(string, string, bool) method writes the style attribute in the following form:

name=value;

The System.Web.HttpUtility.HtmlAttributeEncode(string, System.IO.TextWriter) method is used to encode the value parameter.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0