System.Web.UI.HtmlTextWriter.RegisterAttribute Method

Registers markup attributes, whether literals or dynamically generated, from the source file so that they can be properly rendered to the requesting client.

Syntax

protected static void RegisterAttribute (string name, HtmlTextWriterAttribute key)

Parameters

name
A string containing the name of the markup attribute to register.
key
An System.Web.UI.HtmlTextWriterAttribute that corresponds with the attribute name.

Remarks

The predefined attributes of the HTML markup language are registered by calls to the HtmlTextWriter.RegisterAttribute(string, HtmlTextWriterAttribute) method when the first System.Web.UI.HtmlTextWriter object is created. Dynamic attributes can be registered by using the HtmlTextWriter.RegisterAttribute(string, HtmlTextWriterAttribute) method at other times.

The registration table used by the HtmlTextWriter.RegisterAttribute(string, HtmlTextWriterAttribute) method is static, so registration of attributes applies to all System.Web.UI.HtmlTextWriter objects on the host computer.

Requirements

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