System.Web.UI.Control.ID Property

Gets or sets the programmatic identifier assigned to the server control.

Syntax

[System.Web.UI.Themeable(false)]
[System.Web.UI.Filterable(false)]
[System.ComponentModel.ParenthesizePropertyName(true)]
[System.ComponentModel.MergableProperty(false)]
public virtual string ID { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

Setting this property on a server control provides you with programmatic access to the server control's properties, events, and methods. This property can be set by Web developers by declaring an Control.ID attribute in the opening tag of an ASP.NET server control.

If this property is not specified for a server control, either declaratively or programmatically, you can obtain a reference to the control through its parent control's Control.Controls property.

Note:

Only combinations of alphanumeric characters and the underscore character ( _ ) are valid values for this property. Including spaces or other invalid characters will cause an ASP.NET page parser error.

Requirements

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