Async Pages & Ajax progress bar?

Discussion in 'ASP .Net' started by =?Utf-8?B?RGF2ZQ==?=, Oct 31, 2007.

  1. 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.
     
    =?Utf-8?B?RGF2ZQ==?=, Oct 31, 2007
    #1
    1. Advertising

  2. =?Utf-8?B?RGF2ZQ==?=

    bruce barker Guest

    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.
    >
     
    bruce barker, Nov 1, 2007
    #2
    1. Advertising

  3. 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.
    > >

    >
     
    Jason Hartsoe, Dec 11, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    3,551
  2. John Hann
    Replies:
    0
    Views:
    6,085
    John Hann
    Aug 21, 2004
  3. Charlie Zhang
    Replies:
    3
    Views:
    1,259
    Paul Lutus
    Aug 16, 2004
  4. Matt
    Replies:
    9
    Views:
    70,863
  5. Rob

    progress bar or guage bar

    Rob, Jul 11, 2003, in forum: ASP General
    Replies:
    6
    Views:
    202
    Chris Barber
    Jul 12, 2003
Loading...

Share This Page