Note that there are some explanatory texts on larger screens.

plurals
  1. POIs it possible to change a control's UpdatePanel programmatically during an event?
    primarykey
    data
    text
    <p>I have two UpdatePanels, UpdatePanel1 and UpdatePanel2.</p> <p>I am inside of a server-side event. I would like to remove a control from UpdatePanel1 and add the control to UpdatePanel2. When I attempt to do so I receive an Internal Server Error 500.</p> <p>Something as simple as this:</p> <pre><code>siblingPane.UpdatePanel.ContentTemplateContainer.Controls.Remove(splitter); parentPane.UpdatePanel.ContentTemplateContainer.Controls.Add(splitter); </code></pre> <p>I looked up some how-to's on adding dynamic content to an update panel, but I haven't been able to find anything mentioning this issue in this scenario. Does anyone know anything more about this? Thanks.</p> <p>EDIT: I am having this issue after having the following 'events' happen on my page:</p> <ul> <li>User-initiates action.</li> <li>I respond to the action client-side calling a __doPostBack targeting a control.</li> <li>That control has implemented IPostBackEventHandler. I am now inside of RaisePostBackEvent</li> <li>Control that is responding to the postback has the hierarchy described/shown <a href="https://stackoverflow.com/questions/6754056/moving-dynamic-web-ui-control-from-child-control-to-parent-control-what-should-i">here</a></li> <li>When this postback finishes the state of the web page needs to be modified such that the deletion of some controls has occurred and, in some scenarios, other controls are moved up the DOM hierarchy to a parent UpdatePanel.</li> </ul> <p>I do not want to cause a full-page post-back after my __doPostBack, that would defeat the purpose of everything. I do not have the ability to change the structure of my controls during Page_Init because the controls RaisePostBackEvent is where I do all the heavy work.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload