I have created a custom web control. In that control on CreateChildControls method i dynamically create a Table add rows to it which contains a ImageButton and i am trying to attach an event to this ImageButton but the event never fires ???
I tried on Init method too it does not work . The code goes like this on CreateChildControls
- I create a Panel .
- The i create a table with data and an imagebutton on it
- I add this table to the created panel
- I add this Panel to the Controls.Add method.
I have also observed that if i add a control directly to the Controls.Add() method and attach an event it works fine .
Meaning , 1. Create a button attach an event handler 2. Add to the Controls.Add() method
On doing the above it works fine . Only the child controls events do not get fired is there anything that i am missing ???
Thanks in advance