Control added programmatically not firing event

T

Troy

Hi, I'm loading a usercontrol with image buttons into a panel. When clicking the buttons the click event does not fire. Any suggestions

Thanks
Tro
 
A

Alessandro Zifiglio

Provide some more details. At what stage of your pages life cycle are you
loading the controls. In what method. Are you loading the controls based on
a button click ?


Troy said:
Hi, I'm loading a usercontrol with image buttons into a panel. When
clicking the buttons the click event does not fire. Any suggestions?
 
T

Troy

Alessandro
I was loading the UserControl into a panel based on a button click. Unfortunately, this didn't work. The UserControl never showed up. The UserControl is determined by a database record and associated fields with content for that control on button click. It seems to get this to work, I have to load the sub Get_UserControl, which provides the function described earlier, during the Page_Load event of the base page. When I do this, my button click event fires. But this is wrought with all kinds of problematic behavior, having to load Get_UserControl twice, once during the Page_Load event of the base page, and again within my UserControl dynamically loaded in the panel. Any thoughts

Troy

----- Alessandro Zifiglio wrote: ----

Provide some more details. At what stage of your pages life cycle are yo
loading the controls. In what method. Are you loading the controls based o
a button click


Troy said:
Hi, I'm loading a usercontrol with image buttons into a panel. Whe
clicking the buttons the click event does not fire. Any suggestions
 
A

Alessandro Zifiglio

see if this old post helps resolve your issue

http://groups.google.com/groups?hl=...re&ie=UTF-8&oe=UTF-8&hl=en&btnG=Google+Search

Troy said:
Alessandro,
I was loading the UserControl into a panel based on a button click.
Unfortunately, this didn't work. The UserControl never showed up. The
UserControl is determined by a database record and associated fields with
content for that control on button click. It seems to get this to work, I
have to load the sub Get_UserControl, which provides the function described
earlier, during the Page_Load event of the base page. When I do this, my
button click event fires. But this is wrought with all kinds of problematic
behavior, having to load Get_UserControl twice, once during the Page_Load
event of the base page, and again within my UserControl dynamically loaded
in the panel. Any thoughts?
 

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,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top