Asp.net realtime update progress

Vis1/0N

Expert Member
Joined
Mar 10, 2009
Messages
2,289
I have a old Asp.net 2.0 site that needs a small update. A simple task is now being done in a batch, therefore server side processing from O(1) will change to (O)n with n being up to 2000+ ( 120 seconds in )

Without major redevelopment using more modern tech how could I give a real time update on the progress? When the button in the update panel is clicked then the selected items are posted back and processed. I can have a busy dialog but that is no indicator of progress. The other solutions I can come up with will require some work therefore looking for any quick pointers first.
 

Kosmik

Honorary Master
Joined
Sep 21, 2007
Messages
23,293
I have a old Asp.net 2.0 site that needs a small update. A simple task is now being done in a batch, therefore server side processing from O(1) will change to (O)n with n being up to 2000+ ( 120 seconds in )

Without major redevelopment using more modern tech how could I give a real time update on the progress? When the button in the update panel is clicked then the selected items are posted back and processed. I can have a busy dialog but that is no indicator of progress. The other solutions I can come up with will require some work therefore looking for any quick pointers first.

Maybe look at adding a jquery async progress updater. It can be updated via a call from the server.

Or if you want to really go old school ( not recommended ) , have a control that shows progress ( based on whatever logic you have ) and a timer on the page that forces a post back at a time interval of your choice. Not ideal though, especially in a modern world. I'd investigate the jquery control route first.
 

envo

Expert Member
Joined
Jan 14, 2014
Messages
3,251
without major redevelopment? mmmmm... F5 is just easier and less complicated bro
 

_kabal_

Expert Member
Joined
Oct 24, 2005
Messages
4,500
Is real-time actual progress actually needed? What about fake halving progress bar? Every N units of time, progress the bar 50% of the remaining time, until the ajax promise resolves or rejects
 

Vis1/0N

Expert Member
Joined
Mar 10, 2009
Messages
2,289
Considering that that IE7 support was removed and IE10+ approved recently I have been limited to bug fixes and small features.

I think what I will do is if the bulk operation is in place and expected to take more than 10 seconds I will redirect to a page that does the processing in chunks and display a button to carry on processing the next 200 loops but with a Response.AddHeader("Refresh", "3") to allow the page to postback automatically. Not much to do then.
 

envo

Expert Member
Joined
Jan 14, 2014
Messages
3,251
Wait..... you only got the approval to upgrade to IE10... recently? IE7 support ended in January 2016

1vmhbep.jpg
 
Top