Event of dynamic control

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
 
F

Frank Schumacher

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top