Solved

PostBack a User Control without postingback parent page

Posted on 2004-10-12
5
570 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

839 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