Easy Tutorial
❮ Prop Webcontrol Standard Accesskey Prop Webcontrol Linkbutton Text ❯

ASP.NET ID Property



Definition and Usage

The ID property gets or sets the programming identifier assigned to the control.

This property is typically set and is used when the current control interacts with other controls or scripts. Setting this property on a control provides programmatic access to the control's properties, events, and methods. Web developers can set this property by declaring the ID attribute in the opening tag of an ASP.NET control. If the property is not specified for a control (either declaratively or programmatically), a reference to the control can be obtained through its parent control's Controls property.

Syntax


Example

The following example shows a Button control with the ID property set:


❮ Prop Webcontrol Standard Accesskey Prop Webcontrol Linkbutton Text ❯