Hi folks
I want to implement the following page by Asp.net version 4.0 and ajax but I want to have loading by order like loading item 1 and 2 and so on. I have container or web part but mostly container like simple asp.net panel. how I can implement it ? I used updatepanel and update progress but it doesn't work that I have expected before.
views:
66answers:
3You can use asp:timer ajax controls to initiate loading of all update panels after page skeleton loads. Have update panel 1 loaded after 1 ms of page load, panel 2 after 100ms, 3 after 200ms and so on. Because UpdatePanel control is synchronous they all will load up sequentially exactly how you want it.
Actually not totally true about the timer lapse being unimportant. If all timers fire at the same time for all the associated UpdatePanels, they would not just queue up and fire off one at a time. In fact, by default, when a page makes multiple asynchronous postbacks at the same time, the postback made most recently takes precedence. This will cancel all other asyncronous postabacks from UpdatePanels that have not yet been fired.
I agree the solution is to use AJAX Timers, but you will need to start the next timer upon completion of the previous UpdatePanel completing to load. I have implemented this myself with a combination of JavaScript and .NET server side code. The following link should help you accomplish this task:
Handling Multiple Asynchronous Postbacks: http://disturbedbuddha.wordpress.com/2007/12/12/handling-multiple-asynchronous-postbacks/
Here is another helpful URL as well:
Giving Precedence to a Specific Asynchronous Postback: http://msdn.microsoft.com/en-us/library/bb386456.aspx