473,657 Members | 2,523 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Way for user to see progress on long running asp.net process

Okay I have a website where the user is going to hit a button to kick
off a process that is going to take a long amount of time.
Is there anyway without using AJAX, or possibly a windows control on a
page that connects to a webservice to show the user the progress of
this operation.
It seems almost a given that I must use either ajax or some kind of
control to do this.
Any suggestions would be greatly appreciated.

So far I have come up with two non Ajax/winforms controls solutions.
1) when user clicks button call both the server and the client events.
in the client event call another aspx that actually runs the page via
a popup.
Can tell user they must have popups enabled. Not writing this app for
the world.
In my server code simply call another page that uses javascript
timeout, to call its self every 10 to 30 seconds to read values put in
the session by the process and display status to user.

2) would be launching the process in a thread.
I have always shied away from threads in a web app.
Use them in winforms, windows services, just was never shure what the
behaviour of a thread would be in a web app. Does anyone have any
experience using threads in a web app.

Any advice or suggestions would be greatly appreciated.


Thanks in advance

Ralph

Feb 4 '07 #1
1 2471
On Feb 4, 2:35 pm, "Ralph" <ralph...@gmail .comwrote:
Okay I have a website where the user is going to hit a button to kick
off a process that is going to take a long amount of time.
Is there anyway without using AJAX, or possibly a windows control on a
page that connects to a webservice to show the user the progress of
this operation.
It seems almost a given that I must use either ajax or some kind of
control to do this.
Any suggestions would be greatly appreciated.

So far I have come up with two non Ajax/winforms controls solutions.
1) when user clicks button call both the server and the client events.
in the client event call another aspx that actually runs the page via
a popup.
Can tell user they must have popups enabled. Not writing this app for
the world.
In my server code simply call another page that uses javascript
timeout, to call its self every 10 to 30 seconds to read values put in
the session by the process and display status to user.

2) would be launching the process in a thread.
I have always shied away from threads in a web app.
Use them in winforms, windows services, just was never shure what the
behaviour of a thread would be in a web app. Does anyone have any
experience using threads in a web app.

Any advice or suggestions would be greatly appreciated.
First of all you must use some sort of Ajax to solve this.
The way I would have done this (using Gaia Ajax Widgets at http://
ajaxwidgets.com ) is by:

First have a gaia:Button which when clicked would trigger my server
side event handler.
Then within that event handler I'd create a new thread that oes the
working.
Then I'd have a gaia:Timer which I would ENABLE in that same event
handler, maybe poll every 3 seconds or something...
Then within the "tick" event handler for my timer I'd update another
gaia component, maye a label or maybe a gaia:DynamicIma ge
or something according to how many percent the long task had come...

Now if you want to make it REALLY cool you'd have your "percentage bar/
label/whatever" in a modal gaia:Window which then would obscur the
other controls you have on your page
and forcing the user to actually wait for the process to finish before
he can interact with any of the other controls on your page...

Gaia is downloadable for free (no restrictions at all) at http://
ajaxwidgets.com
Though the free version forces a VERY small link in the upper right
corner of all the pages you stuff Gaia controls onto...

Regarding using threads in web apps, I think there's no problem...
I believe the only reason people have "shielded" themselfs from using
them is that before Ajax there really was no POINT in doing it...
Though I think the max limit of threads pr. process for Windows Server
2003 is 32000 or 64000 or something...
If you expect to get more than 16000 simultanous users using that
logic I think you'll have to fill in with more iron...
..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!

Feb 4 '07 #2

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

Similar topics

4
3261
by: aj | last post by:
Alan, you can achieve this by using XMLHttp Async functionality in a javascript file. Create an aspx page in which execute long running SQL query, then do an XMLhttp post to that page from a js function. In the javascript create 2 funtion Call LoadData in the window onload event.
7
5384
by: Pepi Tonas | last post by:
I have a form that takes some time to load because it has to populate some Data. I was trying to display a form on top of it with an activity bar so that user can see that something's going on. I have tried doing this and using a progress bar that counts up to 100 and then zeros down so that it should be constantly moving while the main or background windows finishes loading. The problem is that the "in progress window" doesn't display...
5
3242
by: B-Dog | last post by:
I'm trying to build a custom progress bar that will run as some subs are running in the background but when I open the custom form with the progress bar on it using the showdialog, none of the subs run until the form is closed but I need the form to be on top so the users can't click anywhere else till the tasks are complete. How would I go about doing this? I need to open this form, runs some subs, then close the form. Thanks
13
1493
by: Samuel R. Neff | last post by:
I want to make my app repaint and show a wait cursor during a long running process but not actually respond to user events. What's the best way to implement this? If I just put the process on another thread, the user can continue to interact with the form. For my own code, I can have a flag in all event handlers, but what about interaction within a control (i.e., expand/collapse tree nodes in treeview). If I change the Enabled...
8
2168
by: pamelafluente | last post by:
I am reposting hoping better luck :) I can't achieve this simple thing: I have an animated gif in an image control (ImageProgress1). The image visibility is set to false. I want that when the User click on a given button (ButtonSomeLongTask) to execute a long task Me.ImageProgress1 become visible until the task on the server is finished. I call the task this way: Protected Sub ButtonSomeLongTask_Click(ByVal sender As Object, ByVal e...
9
3264
by: esakal | last post by:
Hello, I'm programming an application based on CAB infrastructure in the client side (c# .net 2005) Since my application must be sequencally, i wrote all the code in the UI thread. my problem occurs when i try to show a progress bar. The screen freezes. I know i'm not the first one to ask about it. but i'm looking
1
3226
by: Bob | last post by:
Hi, I am having trouble seeing how this bolts together. The UI starts a process which involves a long running database update. All Database activity is handled by a class called DT. DT has a progress event. So I added a bw to the form. The Dowork Calls a method which instantiates a DT and calls its Dataprocessing method.
3
3452
by: Tim Satterwhite | last post by:
Hi All, I think this is a thorny problem, and I'm hoping you can help. I've not found this exact issue described anywhere yet. I have a stored procedure that calls BULK INSERT on a set of text files. These files are FTP'd from a legacy system (a mainframe running MVS). Sometimes, the process steps on iteslf, whereby the bulk insert is attempted on a file whose FTP is still in progress; it's not fully written to disk on the SQL box...
2
2031
by: Ralph | last post by:
Okay I have a website where the user is going to hit a button to kick off a process that is going to take a long amount of time. Is there anyway without using AJAX, or possibly a windows control on a page that connects to a webservice to show the user the progress of this operation. It seems almost a given that I must use either ajax or some kind of control to do this. Any suggestions would be greatly appreciated. Thanks in advance
0
8316
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8737
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...
1
8509
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7345
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...
1
6174
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5636
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
4168
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
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.