| |||||
Control.ID PropertySystem.Web.UI Namespace Control Class Sets or retrieves the programmatic identifier assigned to the server control. Syntax
Property ValueThe programmatic identifier assigned to the control. RemarksSetting this property on a server control provides programmatic access to the server control's properties, methods, and events. This property can be set by declaring an 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 Controls property.
ExampleThe following illustrates how the ID property can be used to determine which of a form's controls have been selected, the value of which is then used for further processing. void getBook ( object src, EventArgs e ) {
string id = ( ( HtmlButton ) src ).ID;
book.KeywordFilter = id;
book.Visible = true;
...
}
See AlsoControl Members Control.NamingContainer INamingContainer |
| ||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme