Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

ASP.NET ID Property

ASP.NET ID Property


Standard Control Properties Reference Manual Control standard properties reference manual


Definition and Usage

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

This property is usually 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 start tag of an ASP.NET control. If this property is not specified for a control (declaratively or programmatically), a reference to the control can be obtained through the Controls property of its parent control.

Syntax

webcontrol

id="

id

" runat="server"

/>


Example

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

Demo Example »


Standard Control Properties Reference Manual Control standard properties reference manual