Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6163757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:52:44+00:00 2026-05-23T21:52:44+00:00

I have two UpdatePanels, UpdatePanel1 and UpdatePanel2. I am inside of a server-side event.

  • 0

I have two UpdatePanels, UpdatePanel1 and UpdatePanel2.

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.

Something as simple as this:

siblingPane.UpdatePanel.ContentTemplateContainer.Controls.Remove(splitter);
parentPane.UpdatePanel.ContentTemplateContainer.Controls.Add(splitter);

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.

EDIT: I am having this issue after having the following ‘events’ happen on my page:

  • User-initiates action.
  • I respond to the action client-side calling a __doPostBack targeting a control.
  • That control has implemented IPostBackEventHandler. I am now inside of RaisePostBackEvent
  • Control that is responding to the postback has the hierarchy described/shown here
  • 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.

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:52:45+00:00Added an answer on May 23, 2026 at 9:52 pm

    The server error probably says something about not being allowed to modify the controls collection? Generally speaking, controls should be added/removed during the OnInit() (maybe it’s the OnPreInit()?) part of the page lifecycle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two updatepanels inside an accordion control, laid out like this: <accordion> <first
I have two classes (MVC view model) which inherits from one abstract base class.
I have two files client.php and server.php. The client file send a HTTP request
I have two tables inside a database. One stores unique userNames and a unique
I have two classes Order and Items I want a method like this class
I have two AJAX UpdatePanels on my ASP.NET 2.0 web form. When I clic
I have two UpdatePanels and two Timers to update them, the Timers' interval are
I have a ajaxToolkit:CollapsiblePanelExtender along with two asp:UpdatePanels it controls (one panel expands the
I have two UpdatePanels in my form, both containing several DropDownLists and TextBoxes ,
I have a complicated case, so I can't post it. I have two UpdatePanels

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.