Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
I have a dashboard where multiple controls access different views which has huge data.
Controls are simple controls and does not have much complexity.These controls calls separate stored procedures and are binded on page load synchronously.
 
I want these controls to load asynchronously.So that page load does not wait for all controls binding to happen.
 
Each should be able to load separatly and with a "in progress" image.
 
What is the best way? Following are few things i thought of
 
1. I thought of putting it in an update panel and then updating it through javascript after page load.
2. Using jquery.load method
 
Please suggest.
Posted 21-Aug-12 1:44am
Comments
sanu antony at 30-Apr-14 1:20am
   
Can I use asyn Method on page load to make the lazy loading more perfect.....
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can go for JQuery Lazy Loading
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

To load asynchronously, you need to use ajax to load the page. If you are not aware of ajax, google Ajax to find many code samples. Even in codeproject there are some good articles on ajax.
 
The concept is call a client method at the end of the page just before end form tag.
 
The method will call ajax to get the data from database and using the data - generate the html. Once the html is generated, place it in a div innerHTML.
 
At the start of the method, show a progress div.
At the end of the method, hide the div.
 
Hope this helps
cheers
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

If you are using the web services means my suggestion is, after the page has finished loading you would call the WebService’s WebMethod to get a new article, when you get the article you could use JavaScript and the DOM to show it in the page.
 
Have a look on the below links,
 
http://www.asp.net/ajax/documentation/live/tutorials/ExposingWebServicesToAJAXTutorial.aspx
 
http://www.asp.net/ajax/documentation/live/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 250
1 Jochen Arndt 155
2 PIEBALDconsult 150
3 DamithSL 125
4 Afzaal Ahmad Zeeshan 120
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 21 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100