Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Async Pages & Ajax progress bar?

Reply
Thread Tools

Async Pages & Ajax progress bar?

 
 
=?Utf-8?B?RGF2ZQ==?=
Guest
Posts: n/a
 
      10-31-2007
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.

 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      11-01-2007
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 (sqlwork.com)


Dave wrote:
> 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.
>

 
Reply With Quote
 
 
 
 
Jason Hartsoe
Guest
Posts: n/a
 
      12-11-2007
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?

"bruce barker" wrote:

> 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 (sqlwork.com)
>
>
> Dave wrote:
> > 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.
> >

>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning progress messages during an async process RSH ASP .Net 0 12-31-2007 03:40 PM
Newbie: async mode dedicated versus async mode interactive!! Pink_Floyd Cisco 4 06-16-2006 12:16 AM
Async webservice call in async webpage (.Net 2.0) does not return Steven ASP .Net Web Services 0 11-30-2005 01:06 AM
Async Webservice, State and progress. Jonathan ASP .Net Web Services 3 12-09-2004 09:05 AM
Progress of a async webservice call ullbergm ASP .Net Web Services 2 11-19-2004 07:45 PM



Advertisments