Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Comments
sanu antony 30-Apr-14 1:20am    
Can I use asyn Method on page load to make the lazy loading more perfect.....

You can go for JQuery Lazy Loading
 
Share this answer
 
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
 
Share this answer
 
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,

VB
http://www.asp.net/ajax/documentation/live/tutorials/ExposingWebServicesToAJAXTutorial.aspx

http://www.asp.net/ajax/documentation/live/tutorials/ConsumingWebServicesWithAJAXTutorial.aspx
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900