System.Web.UI.HtmlTextWriter.WriteAttribute Method

Writes the specified markup attribute and value to the output stream.

Syntax

public virtual void WriteAttribute (string name, string value)

Parameters

name
The attribute to write to the output stream.
value
The value assigned to the attribute.

Remarks

Use the HtmlTextWriter.WriteAttribute(string, string) method to write markup attributes and their values with no encoding. The HtmlTextWriter.WriteAttribute(string, string) method writes the attribute value enclosed in double quotation marks ("). If value is null, the HtmlTextWriter.WriteAttribute(string, string) method writes only the attribute name.

Requirements

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