4

On a website, I'm successfully using an ASHX handler to download files from the server to visitors of my website.

A customer suggested to not rely on the browser UI to visualize the download progress but instead provide some progress on the page to provide a more visual cue.

I.e. first, the user sees a download page with a link/button:

enter image description here

Then, when clicking the Download your file now! button something like this should appear:

enter image description here

Unfortunately, even after searching Google and SO for hours, I found zero similar topics. All occurrences deal with upload, not download. Either I'm using the wrong keywords or there are really no solutions.

Therefore my question:

(How) would it be possible to provide such a download progress?

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
  • 1
    I think, this link will be helpful for you : http://www.fluxbytes.com/csharp/how-to-download-a-file-in-c-progressbar-and-download-speed/ – Anurag Jain Feb 10 '14 at 11:52
  • 1
    Maybe this is also intresting for you: http://stackoverflow.com/questions/21461010/asynctask-with-a-updatepanel/ It actually doesnt care if its a up- or download, because all you need to know is how to update the frontend while you have the download in the background. Its the same as with an upload just the other way, but you need to know how to display it. Maybe the answer in my question will help you. – DatRid Feb 10 '14 at 11:53
  • 2
    @AnuragJain I dont think this link is helpfull, because he is asking for asp.net stuff, and not for windowsform. This is something completly different as far as you have a client-server-relation in asp.net – DatRid Feb 10 '14 at 11:55
  • 1
    @DatRid : This link use as reference not as answer that's why I put this link as comment. – Anurag Jain Feb 10 '14 at 11:59
  • Thanks, guys. The Winform articles are what I found, too. And why I then decided to ask here :-) – Uwe Keim Feb 10 '14 at 12:12
  • 1
    I believe the only way of being able to pull this off is having the file download via a service that you coded yourself on a low level where you can poll for the amount of bytes sent and then use SignalR or something to show the progress on your webpage... – IvanL Feb 10 '14 at 14:04
  • 1
    Usually when you are downloading something from the web your browser shows you a progress bar, hence you won't probably find a lot of information about the subject because downloading is not handled by the website rather by the browser/client. – woutervs Feb 10 '14 at 14:34
  • 1
    @IvanL , could you perhaps point to some examples in that direction? I'm looking to achieve same thing as in the question. – tatigo Mar 09 '15 at 14:04
  • 1
    @tatigo Sorry I'm not aware of any examples. I just suggested a code of action I'd take to try and resolve the issue. – IvanL Mar 10 '15 at 10:09

0 Answers0