Quantcast
Viewing all articles
Browse latest Browse all 5678

Can I specify a UserControl custom event as a Trigger for update panel on Parent page?

I have a parent page which hosts several user controls contained within an accordion on the parent page which are created dynamically. 

My Parent page is wrapped in an UpdatePanel and UserControls are also wrapped in UpdatePanels due to only needing partial postback on most of the user interaction with the control.

Lets say I have an event on each User Control that bubbles back to the parent page called "OnEnableLink". When this event is raised from the UserControl, I'd like to enable a LinkButton on the Control's Parent Page.  When the event is called the code on the parent page catches the event and enables the link [lnkExample.Enabled = true;] but the page isn't reflecting the change as the link button is still disabled.  My assumption is the reason is it's not updating due to the UpdatePanel.  I've tried calling ParentPageUpdatePanel.Update() within the event after i enable the link button and it results in an error that Update() can't be called outside of PreRender.  I'm assuming I need a trigger to update the Parent Page when it intercepts the event from the UserControl but since they are created dynamically I'm lost :-( 

Thanks in advance for any suggestions!


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>