简体   繁体   中英

Advanced method for retrieving data from the database

In my site, I'm using update panel in the master page. Half of my web page will retrieve 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?

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM