473,698 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.I sCompleted 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 3762
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.I sCompleted 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.I sCompleted 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
2951
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 exactly what I want. Here are my goals 1. I would like the IAsyncResult that is returned by the Begin function to be able to be waited on or polled to check for completion. 2. The Begin function would take a callback, and the async process would
5
4040
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
3254
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 btnUpload_Click(object sender, System.EventArgs e) { try { SOPWebService.Client uploader = new
0
1218
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 page with a search box on top & 2 web parts that display search results using web services. Currently, I am calling these web services synchronously (which takes a while).
10
4499
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 consideration here is that it is supplied to the AsyncOperationManager.CreateOperation(userSuppliedState) method... with userSuppliedState being, more or less, a taskId. In this case, the userSuppliedState {really taskId} is of the object type,...
4
1742
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
1015
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 thoughts are to use a web service or WCF service that will manage threading etc. I need to be able to return messages to the user through the browser while the process is in action. Is it possible through ajax to keep sending messages to the...
1
1709
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 anyone can make a suggestion for this, that would be good too). There may be 2 mails or 100 mails. I'm not particularly interested that the page will timeout or not. The tasks will basically be: 1. Pick up the emails from the database.
4
3670
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 back data..we put those control in ajax "update panel" tags...and rest of the non postback enabled controls outside updte panel.... Now we have 6 controls in a web form...2 of them dont need async process..and 4 of them need async process...so we...
0
9171
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8880
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7743
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.