473,387 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.

Oct 31 '07 #1
2 3743
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.
Nov 1 '07 #2
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.
Dec 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Shawn Meyer | last post by:
Hello - I am trying to write a class that has an async BeginX and EndX, plus the regular X syncronous method. Delegates seemed like the way to go, however, I still am having problems getting...
5
by: Homa | last post by:
Hi all, Can anyone give me some links about how to do an async web service call from aspx and display a temperary page before the web service returns? Thanks, Homa Wong
5
by: Paul Hasell | last post by:
Hi, I'm trying to invoke a web method asynchronously but just can't seem to get it to tell me when it has finished! Below is the code I am (currently) using: private void...
0
by: tg | last post by:
Hello, This is more of a design question. I am trying to understand how to use async web service invocation for asp.net 2.0 web parts with an Ajax style update / data rendering. I have a web...
10
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under...
4
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, is there a way to run my javascript method on every async postback? thanks, rodchar
0
by: RSH | last post by:
I have seen numerous examples of progressbars using ajax during long running processes. My issue is basically I have a long running process that must be implemented using a web front end. My...
1
by: jaffarkazi | last post by:
Hi I have a page that is going to send a number of emails that will be fetched from the database. This is on a hosted server, so I don't have any background automatic way of sending mail. (If...
4
by: prit | last post by:
As we know ajax resides between server and client and helps the page's partial rendering...so no need to render all the page controls from scratch....so when we know that some controls requires post...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.