Solved

PostBack a User Control without postingback parent page

Posted on 2004-10-12
5
572 Views
Last Modified: 2012-06-27
I have a webpage that contains a very simple user control and an html based treeview contained within an ASP.net label control.   The treeview is very complex and takes a long time to render from ViewState upon loading the page after postback.   I want to update the simple user control which requires a roundtrip to the server.   This update should take less than a second but because it has to reload the treeview from viewstate it takes 3-4 seconds.  Is it possible to update the usercontrol without posting back the parent page.  I don't want to make any changes to the parent page outside of the user control.

Thanks
0
Comment
Question by:wibleb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 5

Expert Comment

by:ajitanand
ID: 12294914
if it is a simple html based tree view, can't you place its HTML in a javascript file, and store it externally? this way it wont get added to the viewstate and the page will load and process faster.

does this help?
0
 

Author Comment

by:wibleb
ID: 12297792
The Tree View is a heirarchy that is pulled from a database.  It is generated at run time on the initial page load.  I just know that it will not have changed when the User Control is updated.   What I have done now is disabled viewstate for the treeview and just recreate the html on each postback.  It requires a few more database hits but it is still faster than processing viewstate.   If I can't find a way to do a partial postback then this solution will work for me.
0
 
LVL 4

Accepted Solution

by:
vinhthuy_nguyen earned 125 total points
ID: 12321098
Just a small idea, why don't you use frame ?
<frameset rows="68,*,21" framespacing="0" border="0" frameborder="0">
      <frameset cols="*,81%">
      <frame name="contents" target="main" src="treeview_here.aspx" frameBorder="no" scrolling="no">
      <frame name="main" src="usercontrol_loadhere.aspx" target="_self">
      </frameset>
Have a nice weekend
0
 

Author Comment

by:wibleb
ID: 12534294
I think frames would be an ok solution.  What I actually did was disabled ViewState and recreated the tree on every postback.  It turned out that ViewState was so large and slow that rehitting the database was faster.  It is still not super fast but noticable improvement nonetheless.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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