System.Web.UI.AttributeCollection.Add Method

Adds an attribute to a server control's System.Web.UI.AttributeCollection object.

Syntax

public void Add (string key, string value)

Parameters

key
The attribute name.
value
The attribute value.

Remarks

If the string in the value parameter contains an ampersand (&), the character is automatically encoded. The resulting HTML representation is "&".

Requirements

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