Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PostBack a User Control without postingback parent page

Posted on 2004-10-12
5
Medium Priority
?
577 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 375 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

730 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