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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top