467,104 Members | 1,089 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,104 developers. It's quick & easy.

Status-Progress Bar for file download and upload to web server

Everytime I download a file from the web I get a nice animated
dialogue box that shows the size of the file, how much has been
received and the approximate remaining time. It also gives the
connection bandwidth.
I've looked in different development groups through google/groups to
find an example of C # code that would give me a similar readout.
The closest I've come is my local web developer says the Internet
Explorer is the application that does that and somehow I have to
connect into Internet Explorer to get this dialogue box.
I just want to show the user the progress of either their data upload
or the progress of their data download. I know the size of the zip
file they are loading for the upload, I don't know the size of the
file for the download.

Any suggestions would be appreciated.
I've also looked in the .NET documentation. For something so common,
it sure is hard to find. I'm stuck.
Nov 15 '05 #1
  • viewed: 6541
Share:
3 Replies
Gary,

When Internet Explorer does this, it depends on a few things. First,
when downloading, it might not know the size of the content that it is
downloading. In this case, it makes a guess as to what the max size is, and
then works from that (at least for the progress bar on IE, for the dialog,
it doesn't show a progress bar).

Now, as far as I know, there isn't a way to show that dialog yourself.
So, to do this, you will have to create your own. You should look at the
ContentLength property to see if there is a length associated with the
download. If there is, then you can use that to determine the max value of
your progress bar. Otherwise, you will have to make a best guess based on
other factors.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gary O'Malley" <ga**********@speakeasy.net> wrote in message
news:a3**************************@posting.google.c om...
Everytime I download a file from the web I get a nice animated
dialogue box that shows the size of the file, how much has been
received and the approximate remaining time. It also gives the
connection bandwidth.
I've looked in different development groups through google/groups to
find an example of C # code that would give me a similar readout.
The closest I've come is my local web developer says the Internet
Explorer is the application that does that and somehow I have to
connect into Internet Explorer to get this dialogue box.
I just want to show the user the progress of either their data upload
or the progress of their data download. I know the size of the zip
file they are loading for the upload, I don't know the size of the
file for the download.

Any suggestions would be appreciated.
I've also looked in the .NET documentation. For something so common,
it sure is hard to find. I'm stuck.

Nov 15 '05 #2
"Everytime I download a file from the web I get a nice
animated dialogue box that shows the size of the file,
how much has been received and the approximate remaining
time. It also gives the connection bandwidth."

Yes, this is definitely IE's doing and nothing that web
developers are writing themselves. Are you trying to
mimic this feature in a windows application or your own
web app?

JER
Nov 15 '05 #3
"Jerry Negrelli" <je************@removethispartdatascientific.com > wrote in message news:<0f****************************@phx.gbl>...
"Everytime I download a file from the web I get a nice
animated dialogue box that shows the size of the file,
how much has been received and the approximate remaining
time. It also gives the connection bandwidth."

Yes, this is definitely IE's doing and nothing that web
developers are writing themselves. Are you trying to
mimic this feature in a windows application or your own
web app?

JER


Thanks for the post to Jerry and Nicholas.
Yes, this is a desktop/laptop C# application that syncs data from a
central datastore (SQL2000) using Web Services to upload a compressed
XML file with XML Schema info included. Zip file contains changed
records and new records from last upload date in xml format.
The user also downloads using a criteria of last download date and if
the record has changed since the last download.
That aside, I want to give the users in the field a pop up form,
similar to the one we all see when downloading files from the web.
Form should show file size, what has been uploaded both numeric and
progress bar format, and download speed that is occuring.
The question is, when using web services in C# what information can I
get
on what is happening during data transfer?
Are there any hooks in Web Services that I can use to either display
this information directly or is there information I can 'listen' to to
derive the information I want to display?(equations etc.)
Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by Ian Shere | last post: by
2 posts views Thread by Charles Mendell | last post: by
6 posts views Thread by Ada | last post: by
19 posts views Thread by Frances | last post: by
18 posts views Thread by mistral | last post: by
reply views Thread by Edwin.Madari@VerizonWireless.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.