Async Pages & Ajax progress bar?



I'm using an async page to kick off a couple of asynchronous web services
using the PageAsyncTask class.

I'm also testing a progress bar that uses an Ajax UpdatePanel and Timer
control to postback every 5 or 10 seconds and increment the progress.

However, Is there a way to merge these two concepts so that I can check the
status of the IAsynchResult.IsCompleted property on each task and update the
UI without re-initializing my collection of IAsynchHandles

I want to display to the user something like the following.

"Task A" = Completed!
"Task B" = Completed!
"Task C" = Working...
"Task D" = Completed!

Thanks, Dave.



bruce barker

this can be done, but it will be tricky but fun.

first the limitations:

1) by default (unless your users hack their registry) only two
concurrent requests to the same web site are allowed. this will allow
one update panel request, and a polling call.

2) if a page enables session, then requests are queued. this means the
polling call can not use session to get status, or it will not return
until the panel request finishes.

so you want to assign a request guid to the update panel request (a
hidden field will work). then the async event handles can update an
object in a static pool identified by the request guid.

make a second webservice that the client script can call passing the
request guid, a return the status.

instead of a webservice, you could also write a page that returned a
cool gif of the status. use a client timer, and set an img src to the page.

-- bruce (



Jason Hartsoe

bruce, i'm trying to do something similar...have you figured out how to do
this? if so would you be willing to share your examples?

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question