System.Web.UI.XhtmlTextWriter.AddRecognizedAttribute Method

Adds an attribute to an XHTML element. The collection of element-specific attributes for the System.Web.UI.XhtmlTextWriter object is referenced by the XhtmlTextWriter.ElementSpecificAttributes property.

Syntax

public virtual void AddRecognizedAttribute (string elementName, string attributeName)

Parameters

elementName
The XHTML element to add the attribute to.
attributeName
The attribute to add.

Remarks

Use the XhtmlTextWriter.AddRecognizedAttribute(string, string) method to add an attribute to an XHTML element. The added attribute can then be recognized and rendered by the System.Web.UI.XhtmlTextWriter object. To prevent the writer from rendering a common attribute of an XHTML element, use the XhtmlTextWriter.RemoveRecognizedAttribute(string, string) method.

Requirements

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