System.Web.UI.ChtmlTextWriter.OnAttributeRender Method

Determines whether the specified cHTML attribute and its value are rendered to the requesting page. You can override the ChtmlTextWriter.OnAttributeRender(string, string, HtmlTextWriterAttribute) method in classes that derive from the System.Web.UI.ChtmlTextWriter class to filter out attributes that you do not want to render on devices that support cHTML.

Syntax

protected override bool OnAttributeRender (string name, string value, HtmlTextWriterAttribute key)

Parameters

name
The cHTML attribute to render.
value
The value assigned to name.
key
The System.Web.UI.HtmlTextWriterAttribute associated with name.

Returns

true to write the attribute and its value to the System.Web.UI.ChtmlTextWriter output stream; otherwise, false.

Remarks

By default, the ChtmlTextWriter.OnAttributeRender(string, string, HtmlTextWriterAttribute) method prevents globally suppressed attributes that are listed in the ChtmlTextWriter.GlobalSuppressedAttributes property and element-specific, suppressed attributes that are listed in the ChtmlTextWriter.SuppressedAttributes property from being written to the output stream. You can override the behavior of the ChtmlTextWriter.OnAttributeRender(string, string, HtmlTextWriterAttribute) method in classes that are derived from the System.Web.UI.ChtmlTextWriter class.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0