views:

54

answers:

2

Hi! In my site, I'm using update panel in the master page. Half of my web page will retreive the data from the database in dynamic. As, my update panel is in master page(with ajax loader), it is taking much time for every event. Is there any other advanced method to get the data from the database instead of using update panel.. Or any other idea instead of this??? Plz, tell me any idea..

+1  A: 

I think you need to profile to see where the bottleneck is; I expect you have unnecessary code going on in your aspx that isn't really needed for the UpdatePanel.

Personally, I wouldn't use UpdatePanel now; I'd use a simple (but separate) page (or route, if using MVC) that just does the code needed for this work, and use jQuery to load it.

Marc Gravell
I don't know about JQuery and MVC. I'm fresher.. Any link will be helpful for me???
Nila
That *isn't* a brief topic; there are two different things there, that take more time than I have to explain (my train stops soon). For MVC, "Nerd Dinner" is a reasonable start (http://weblogs.asp.net/scottgu/archive/2009/04/28/free-asp-net-mvc-nerddinner-tutorial-now-in-html.aspx), but I stress: changing the implementation isn't a 2 minute job. Maybe try profiling first... check what code is happening at page-load? It might be more than you expect.
Marc Gravell
A: 

I think you want to load your web page from database table which contains html. If it is so then the best idea would be to create controls for headers/ footers or repeated sections and use caching which would reduce the load time of your web pages.

You could easily cache your controls. You can check here http://msdn.microsoft.com/en-us/library/aa478965.aspx

Happy coding

Ravia