User Control within User Control - Event not firing

D

Don

I have a User Control called Menu that is used in another User Control
called header. It seems the button clicked event in the first control
(Menu) is not firing.

If I click a button on the menu the page will reload but the code in
the button click event in the code-behind is newver executed. If I put
this menu control on a page directly ir works.

Aby ideas?

Don
 
D

Don

The control in question is dynamically created and it is recreated on
postback. When the page refrsh I see the controls it's just that the
button click event is not getting picked up.
 
K

Karl Seguin

Make sure the controls are re-created in the same order and that they share
the same Ids....events are raised based on control ids which (a) you can
force to be different or (b) could be generated differently both of which
you want to make sure aren't happening

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
 

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,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top