The code you have found is not going to work.
There is a big difference between windows applications and websites. Most important is that a website is client-server based and uses html for communication. The client sends a request to the server and the server sends a response. There is no other communication until another request is sent from the client.
With html only you cannot achieve this, you will need
ajax[
^] to send asynchronous requests from the client to get the status of the download and update the screen. There are also flash progress bars, but I wouldn't recommend those.
Take a look at this article to get started:
http://csharptechies.blogspot.nl/2010/09/displaying-jquery-progressbar-with-ajax.html[
^]