views:

182

answers:

1

Hi,

Question to die hard asp.net experts. I have spent much time trying to find an answer or to do it myself but no luck so far.

ASP.NET web application. I plan to improve page load time so that user experience is better. I want to delay load sections of page using UpdatePanels. I can make one UpdatePanel update itself right after page loads using timer with minimum interval. That works just fine but steps begin when trying to have it done with multiple UpdatePanels. Basically what happens is all panels are updated but sequentially rather than all at the same time.

Now, I have read that this is due to a fact that each async postback result caries full page viewstate and to prevent from viewstate inconsistencies asynchronous postbacks are serialized. Actually they say that only last callback would be successful so I am lucky to have them serialized, I guess.

And now the big question: has anyone found a way round it? In ASP.NET if possible. This would be a VERY valued answer probably not only for me.

Thanks, thanks, thanks (for working answer :-)

+1  A: 

UpdatePanels are synchronous by design.

If you want to execute multiple requests concurrently, you'll need to use page methods, AJAX services, or raw AJAX. Either way means giving up on ViewState.

If you want to render ASP.Net controls concurrently for multiple AJAX requests, you can make small independent ASPX files that contain the controls, send AJAX requests to them, and insert the rendered HTML into the DOM. In jQuery, you would do this like this: $('selector').load('something.aspx'). Note that neither postbacks nor viewstate would work.

SLaks
That is probably the best answer I can get. It's a bit sad to learn that and pity it is not clearly stated in help/docs. Even more, AsyncPostBackTrigger trigger type would suggest that UpdatePanel supports asynchronous operations.I do not want to split page into bunch of sub-pages - solution not worth the hassle. But how can I use page methods for that?
Maciej
What are you asking?
SLaks
Page methods are not what I'm after here. Probably JavaScript would be my answer. Thanks.
Maciej