473,473 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Show Upload Progress

I'm enabling users to upload files to the server. I'd like to show them some
indication of percent complete. How can this be done?

Thanks!
Nov 18 '05 #1
3 2020
One solution is to use a timer. Set a flag to show that the load has
started. Everytime the timer event fires examine the flag. As long as the
flag is set, display your message. When it's done, change the flag and stop
the timer.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Jeff S" <Je*******@YaNopeSpamhoo.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
I'm enabling users to upload files to the server. I'd like to show them some indication of percent complete. How can this be done?

Thanks!

Nov 18 '05 #2
This approach works to keep the user occupied while the file is uploaded.
But it does not show true progress as a percentage of the task completed.

ASP.Net blocks you from getting any data once the upload begins.
So you have to write code to intercept the request and handle it yourself.

In fact, to get a true percentage is extremely difficult. I read a thread on
the topic that lasted almost 2 years. Some guys posted 90% of the code
required to do it and then hired themselves out to 3rd party companies and
built it for them. To my knowledge there is no free public domain code for
how to do this.
--
Joe Fallon


"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...
One solution is to use a timer. Set a flag to show that the load has
started. Everytime the timer event fires examine the flag. As long as the
flag is set, display your message. When it's done, change the flag and stop the timer.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Jeff S" <Je*******@YaNopeSpamhoo.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
I'm enabling users to upload files to the server. I'd like to show them

some
indication of percent complete. How can this be done?

Thanks!


Nov 18 '05 #3
Sounds like this will do for my situation. I understand it's not a true
measure of progress, but in my situation I'm most interested in letting the
user know that the upload is not hung and to please continue waiting. I'd
hate for them to restart their session or repeatedly click the "upload now"
button.

I'm using the HtmlInputFile control, and I'm a bit sketchy on *how* it works
(although I do have it all working). I suppose it works with the browser to
enable navigation of the client machine to find the file to be uploaded, but
beyond that I'm not sure what happens in order to copy the file from the
client to the server. I have a separate button that initiates a postback:
does the uploaded file come in as part of the POST (postback) data? If not,
how doess it come in? Where and when would I initiate the timer? and where
would I set the flag? I could figure it all out except that I'm just not
clear on when/where in the code I'd get a chance to start the timer and set
the flag prior to the upload actually beginning.

Thanks.

"Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message
news:u8**************@TK2MSFTNGP11.phx.gbl...
One solution is to use a timer. Set a flag to show that the load has
started. Everytime the timer event fires examine the flag. As long as the
flag is set, display your message. When it's done, change the flag and stop the timer.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"Jeff S" <Je*******@YaNopeSpamhoo.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
I'm enabling users to upload files to the server. I'd like to show them

some
indication of percent complete. How can this be done?

Thanks!


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD"...
3
by: Jeff S | last post by:
I'm enabling users to upload files to the server. I'd like to show them some indication of percent complete. How can this be done? Thanks!
1
by: Garett | last post by:
I am creating a document manager of sorts in ASP.net and it would be really nice to have some sort of file upload progress bar for larger files. Companies such as www.websupergoo.com and...
1
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
6
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is...
1
by: Marko Vuksanovic | last post by:
I used the following code for implementing a file upload progress indicator, using UpdateProgress Panel, though I have a problem that FileUpload.Has File always returns false. Any suggestions what...
2
by: Adam R | last post by:
Looking for an upload progress meter which can works with 'non-patched' PHP4. -- -------------------------------------- Adam Raszkiewicz Brothers-in-arts.com...
0
by: tower.grv | last post by:
Hello. I have created file upload progress bar. It coded with php and AJAX. The problem is it works on some servers but doesn't work on another. Maybe it depends from php or apache version. But...
1
by: Swan | last post by:
Can anyone plz tell me,I have OCX created Http upload control.In that I am sending chunk wise data.Everything is working fine.My question is-how can I show Upload progress or Uploading...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.