System.Web.UI.HtmlTextWriter.GetAttributeKey Method

Obtains the corresponding System.Web.UI.HtmlTextWriterAttribute enumeration value for the specified attribute.

Syntax

protected HtmlTextWriterAttribute GetAttributeKey (string attrName)

Parameters

attrName
A string that contains the attribute for which to obtain the System.Web.UI.HtmlTextWriterAttribute.

Returns

The System.Web.UI.HtmlTextWriterAttribute enumeration value for the specified attribute; otherwise, an invalid System.Web.UI.HtmlTextWriterAttribute value if the attribute is not a member of the enumeration.

Remarks

If attrName is null or an empty string (""), or cannot be found in the table of attribute names, the value -1, typed to an System.Web.UI.HtmlTextWriterAttribute object, is returned.

Requirements

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