Show Progress Bar % with estimated time while uploading a file
-
Hi all, I need to show a progress bar with % of loading while uploading a file. Can any one help on this i am using VS2005. Thanks in advance, Balu.
-
Hi all, I need to show a progress bar with % of loading while uploading a file. Can any one help on this i am using VS2005. Thanks in advance, Balu.
If you're using your own code to do the actual upload, then you can write it to provide this information. If you're using a single method call and it does the upload for you, you've got no way on getting any progress information unless the class/method you use provides such.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
Hi all, I need to show a progress bar with % of loading while uploading a file. Can any one help on this i am using VS2005. Thanks in advance, Balu.
You can derive the "remaining time" from the current percentage. You take a timestamp at the moment that processing starts. At every progress-change, you calculate the duration to do "1%", based on the time elapsed since the start. Subtract the progress from 100%, and multiply by the duration that you calculated in the previous step. The first five seconds give a lousy avarage; it's generally a good idea to start it with the term "unknown/calculating".
I are Troll :suss:
-
You can derive the "remaining time" from the current percentage. You take a timestamp at the moment that processing starts. At every progress-change, you calculate the duration to do "1%", based on the time elapsed since the start. Subtract the progress from 100%, and multiply by the duration that you calculated in the previous step. The first five seconds give a lousy avarage; it's generally a good idea to start it with the term "unknown/calculating".
I are Troll :suss:
-
Hello, I am new in silverlight. I am using silverlight 3. I want to show "time left" on preogress bar in the hh/mm/ss format. How should I do this. PLease provide detailed solution.
archabhi123 wrote:
I am new in silverlight.
I haven't used Silverlight yet, so it seems that you're already ahead of me :)
archabhi123 wrote:
I want to show "time left" on preogress bar in the hh/mm/ss format.
To calculate how much time there's left, you'd first have to calculate how much time is required for a single step. Imagine your progressbar having 100 steps. First you'd write the code to time the first step. Next, you multiply this with the amount of steps left. If your progressbar is at 60, you'd have 40 steps left to perform - and if a step takes two seconds, you can calculate that it will (probably!) take 40 (steps) * 2 (seconds) = 80 seconds. Then you'd have to format those 80 seconds in the hh/mm/ss format and update the actual progressbar. --edit; You reacted to an somewhat older post on the forum. You might get more answers if you post it as a new question in the "Silverlight"-forum.
I are Troll :suss: