On one of my pages I query a database for a number of records and dynamically add child controls to a panel control on my page. The child controls of the Panel display specific data from each row returned by my query. How can I wire up c# event handlers for any of these dynamically created controls???
Rhys

1 answers
Say if your event handler is called ExecuteClick and your control is a button called Button1, then you may do:
<code>
Button1.Click += new System.EventHandler(this.ExecuteClick);
</code>
to wire it up.
answered 2 years ago by:
0
Apologies, already sorted. I know how to wire up events but thought it may be different for dynamically created controls without checking for some reason.
I NEED COFFEE!!!
Rhys
answered 2 years ago by:
0
This post was imported from csharpfriends, if you have a similiar question please ask it again.
All previous members have been migrated, hope you enjoy the new platform!