Event of dynamic control

  • Thread starter Thread starter Frank Schumacher
  • Start date Start date
F

Frank Schumacher

Hi NG,

I add some ImageButtons to an user control, using the placeholder object
as a container. I like to get the clickevent from that button so i added
a method to the click property:
myIB.Click += new
System.Web.UI.ImageClickEventHandler(this.ImageButtonHier_Click);

where ImageButtonHier_Click is my event handling method.

The code compiles, but when I click the button, no event is fired.

Can anyone help me out?

Thanks in advance,
Frank
 
Thanks for the reply Karl, after making sure that the page is created
again after postback (even if i don't need the uc anymore) my event has
fired.
 
Back
Top