Monday, March 26, 2012

Progress display priority to low

I have a page where a very large CSV response is generated on a button-click. During that action I want to show a progress which I have made an ASP.NET AJAX PageMethod for and I call it from a javascript interval. However once the processing is happening, my progress doesn't update. Either the interval is stopped by the browser or the runtime can't accept the pagemethod call because it's too busy? Is there a way around this? I tried threading, but apparently that doesn't allow returning something...

Thanks

You are missing how AJAX calls work... Once a request is made to the server it will only receive the callback when the method completes. See my previous post, here:http://forums.asp.net/p/1151473/1879009.aspx.

An approach you can use is:http://blogs.visoftinc.com/archive/2007/09/10/modalupateprogress.aspx. There isn't a real-time progress in that approach however. The process to do a "real-time" progress bar is extra overhead in the web world; animated gifs are typically used (see:http://www.ajaxload.info/ for some good graphics)

-Damien

No comments:

Post a Comment