Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UpdatePanel sends enter page back?

Posted on 2008-10-11
5
Medium Priority
?
739 Views
Last Modified: 2013-11-08
I've read that the asp.net (3.5) UpdatePanel sends the entire page back on postback.  How can I verify this?

If I want the UpdatePanel functionality without sending back the entire page, would I need to create my own AJAX async and an HTML server side DIV tag to hold everything or just go with a regular Panel?  I want to create a CustomPanel that is basically an UpdatePanel but only renders what's in the panel on async calls.
0
Comment
Question by:brettr
  • 2
  • 2
5 Comments
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 750 total points
ID: 22696099
red the following link - you will find some good discussion about update panels - it might be helpful
http://stackoverflow.com/questions/72541/one-update-panel-vs-multiple-update-panels
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 750 total points
ID: 22698882
The reason of existance of updatepanel is that we dont want to send back the entire page. Updatepanel sends back the controls which are enclosed within updatepanel.
0
 

Author Comment

by:brettr
ID: 22699468
I have this type of layout:

<updatepanel ID="panelContainer">
   <updatepanel ID="panel1">controls</updatepanel>
   <updatepanel ID="panel2" visible=false>controls</updatepanel>
   controls  
  <updatepanel ID="panel3">controls</updatepanel>
</updatepanel>

Usually, something in say panel1 will cause panel2 to become visible.  I need panelContainer for this to happen dynamically.   The problem is that panel3 and any other panels not directly involved in this action gets caught up in the network traffic (part of response), which is unnecessary.   Is there a way around that?
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22699645
remove the top level update panel and try again I think it should work as required
0
 

Author Comment

by:brettr
ID: 22699715
No, as describe above, that will not work.  You'll get an error like this:

Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'UpdatePanel2'. If it is being updated dynamically then it must be inside another UpdatePanel.
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Loops Section Overview
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question