Solved

PostBack a User Control without postingback parent page

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Log4Net custom Appender not being fired. 5 76
Why don't I see this table in EDMX file? 2 24
ASP.NET Web API or ASP.NET Core MVC? 3 53
Output Caching in IIS 2 9
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now