Click event doesn't fire o dynamicly added user controls

  • Thread starter Thread starter Henke
  • Start date Start date
H

Henke

Hi
I have a aspx-page with a panel-control. On this panel control I add user
controls dynamicly with LoadControl and panel.Controls.Add(myControl).

On some of the dynamicly added user controls I have button's and handlers
for the click event.

Why doesn't the event get fired in the dynamicly added control?

Thanks!

/Henke
 
Hi
I have a aspx-page with a panel-control. On this panel control I add user
controls dynamicly with LoadControl and panel.Controls.Add(myControl).

On some of the dynamicly added user controls I have button's and handlers
for the click event.

Why doesn't the event get fired in the dynamicly added control?

Thanks!

/Henke

the dynamic controls have to be readded to the form and the event
handlers have to be recreated each time the page comes back.

-Adam
 
Back
Top