473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Progress bar

Hi, while the user is uploading a file, is possible to show a progress bar?
Using VS 2005 Asp.net 2.0 C#

Thanks!
Aug 29 '07 #1
8 2046
It is but why? The file upload takes like a second, so your progress bar
will never been seen.
Now if you were uploading the file and processing it all at the same time,
then maybe the progress bar can be seen, but just for an upload, makes no
sense due to the time it takes for it to upload.


"Paulo" <pr*****@uol.com.brwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
Hi, while the user is uploading a file, is possible to show a progress
bar? Using VS 2005 Asp.net 2.0 C#

Thanks!

Aug 30 '07 #2
The server doesn't know what size the file is until it's done uploading,
so I think your best option is to either use an animated gif to show
"something" while the upload is going on, or use AJAX. The postback
itself will contain the file, so you'll need to use client-side code to
do the displaying.

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Paulo wrote:
Hi, while the user is uploading a file, is possible to show a progress bar?
Using VS 2005 Asp.net 2.0 C#

Thanks!

Aug 30 '07 #3
true, but regardless of what is used, the upload takes a second or so, so it
may never even be seen by the user.
I have an upload page and I tried adding one to it, but due to the time it
actually took to upload the file the user never saw the progress/animation
on the screen.
"Steve" <ln********************@gmail.comwrote in message
news:ej*************@TK2MSFTNGP06.phx.gbl...
The server doesn't know what size the file is until it's done uploading,
so I think your best option is to either use an animated gif to show
"something" while the upload is going on, or use AJAX. The postback itself
will contain the file, so you'll need to use client-side code to do the
displaying.

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Paulo wrote:
>Hi, while the user is uploading a file, is possible to show a progress
bar? Using VS 2005 Asp.net 2.0 C#

Thanks!

Aug 30 '07 #4
The OP didn't say anything about how large the file is. It could be a
10MB file, which would take longer than a second or two?

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Mike wrote:
true, but regardless of what is used, the upload takes a second or so, so it
may never even be seen by the user.
I have an upload page and I tried adding one to it, but due to the time it
actually took to upload the file the user never saw the progress/animation
on the screen.
"Steve" <ln********************@gmail.comwrote in message
news:ej*************@TK2MSFTNGP06.phx.gbl...
>The server doesn't know what size the file is until it's done uploading,
so I think your best option is to either use an animated gif to show
"something" while the upload is going on, or use AJAX. The postback itself
will contain the file, so you'll need to use client-side code to do the
displaying.

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Paulo wrote:
>>Hi, while the user is uploading a file, is possible to show a progress
bar? Using VS 2005 Asp.net 2.0 C#

Thanks!

Aug 30 '07 #5
The file size may vary, example if the size is 10MB @ 10/KBs will take ~
5mins... I dont know the user bandwidth... so I would like to show to him
some progress..

Thanks!

"Steve" <ln********************@gmail.comescreveu na mensagem
news:%2****************@TK2MSFTNGP04.phx.gbl...
The OP didn't say anything about how large the file is. It could be a 10MB
file, which would take longer than a second or two?

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Mike wrote:
>true, but regardless of what is used, the upload takes a second or so, so
it may never even be seen by the user.
I have an upload page and I tried adding one to it, but due to the time
it actually took to upload the file the user never saw the
progress/animation on the screen.
"Steve" <ln********************@gmail.comwrote in message
news:ej*************@TK2MSFTNGP06.phx.gbl...
>>The server doesn't know what size the file is until it's done uploading,
so I think your best option is to either use an animated gif to show
"something" while the upload is going on, or use AJAX. The postback
itself will contain the file, so you'll need to use client-side code to
do the displaying.

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Paulo wrote:
Hi, while the user is uploading a file, is possible to show a progress
bar? Using VS 2005 Asp.net 2.0 C#

Thanks!
Aug 30 '07 #6
then yeah you can use an atlas window to show the progress, etc.
"Paulo" <pr*****@uol.com.brwrote in message
news:%2******************@TK2MSFTNGP02.phx.gbl...
The file size may vary, example if the size is 10MB @ 10/KBs will take ~
5mins... I dont know the user bandwidth... so I would like to show to him
some progress..

Thanks!

"Steve" <ln********************@gmail.comescreveu na mensagem
news:%2****************@TK2MSFTNGP04.phx.gbl...
>The OP didn't say anything about how large the file is. It could be a
10MB file, which would take longer than a second or two?

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Mike wrote:
>>true, but regardless of what is used, the upload takes a second or so,
so it may never even be seen by the user.
I have an upload page and I tried adding one to it, but due to the time
it actually took to upload the file the user never saw the
progress/animation on the screen.
"Steve" <ln********************@gmail.comwrote in message
news:ej*************@TK2MSFTNGP06.phx.gbl...
The server doesn't know what size the file is until it's done
uploading, so I think your best option is to either use an animated gif
to show "something" while the upload is going on, or use AJAX. The
postback itself will contain the file, so you'll need to use
client-side code to do the displaying.

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Paulo wrote:
Hi, while the user is uploading a file, is possible to show a progress
bar? Using VS 2005 Asp.net 2.0 C#
>
Thanks!

Aug 30 '07 #7
re:
!The server doesn't know what size the file is until it's done uploading

Indeed.

re:
! so I think your best option is to either use an animated gif to show
!"something" while the upload is going on, or use AJAX.

Another option would be to use an animated GIF to keep the user
entertained while the upload finishes and create a FileSystemWatcher
object to redirect the user to "uploadFinished.aspx" when the file has finished uploading.

To do that, you'll have to import the FileSystemWatcher namespace :

System.IO.FileSystemWatcher

Something like this ?

public void CreateWatcher()
{
//Create a new FileSystemWatcher
FileSystemWatcher watcher = newFileSystemWatcher();

//Set the filter to only catch ZIP files.
watcher.Filter = "*.zip";

// Perhaps a variable could be created to hold the exact name
// of the file in the filter, obtained from the File.Upload textbox.

//Subscribe to the Created event.
watcher.Created += new FileSystemEventHandler(watcher_FileCreated);

//Set the monitored path to your upload directory
watcher.Path = @"C:\Temp\";

//Enable the FileSystemWatcher events.
watcher.EnableRaisingEvents = true;
}

void watcher_FileCreated(object sender, FileSystemEventArgs e)
{
//When the .zip file has been created in C:\Temp\ ...
Response.Redirect("~/uploadFinished.aspx", false);
return;
}

I haven't done this...but it seems quite possible.
If you try it, please let us know if it worked.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Steve" <ln********************@gmail.comwrote in message news:ej*************@TK2MSFTNGP06.phx.gbl...
The server doesn't know what size the file is until it's done uploading, so I think your best option is to either use
an animated gif to show "something" while the upload is going on, or use AJAX. The postback itself will contain the
file, so you'll need to use client-side code to do the displaying.

Steve C.
MCSD,MCAD,MCSE,MCP+I,CNE,CNA,CCNA
Paulo wrote:
>Hi, while the user is uploading a file, is possible to show a progress bar? Using VS 2005 Asp.net 2.0 C#

Thanks!

Aug 30 '07 #8
On Aug 29, 11:32 am, "Paulo" <prbs...@uol.com.brwrote:
Hi, while the user is uploading a file, is possible to show aprogressbar?
Using VS 2005Asp.net2.0 C#
Yes. There are several file upload progress bar components available,
including my open-source NeatUpload component:

http://www.brettle.com/neatupload

--Dean

Aug 30 '07 #9

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

Similar topics

3
by: SpamProof | last post by:
I got an animated gif that is a barber pole spinning that I want to use as a progress bar. The problem is that is stops spinning (shows 1 frame) when my browser is processing a submited request...
7
by: Pepi Tonas | last post by:
I have a form that takes some time to load because it has to populate some Data. I was trying to display a form on top of it with an activity bar so that user can see that something's going on. ...
1
by: scorpion53061 | last post by:
this code came from cor and I think Armin authored it. I am trying to download an access database and track its progress. It is reading the size fo the file but I am unsure of how to get the...
8
by: Brian Henry | last post by:
I created a smooth progress bar with this code.. but if you update the values in a row quickly of it and watch it on screen it flickers... how would i change this to reduce the flickering?...
8
by: WhiteWizard | last post by:
I guess it's my turn to ASK a question ;) Briefly my problem: I am developing a Windows app that has several User Controls. On one of these controls, I am copying/processing some rather large...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
15
by: eladla | last post by:
Hi! I am creating a composite control the does some of it`s own data access. I want to display a progress bar between the time the page is loaded and the control place holder is displayed and...
5
by: Aggelos | last post by:
Hello I am doing sevreral scripts like sending a newsletter that might take a while to finish first to prevent the browser from timing out and to keep the user informed of the process progress I...
1
by: Bob | last post by:
Hi, I am having trouble seeing how this bolts together. The UI starts a process which involves a long running database update. All Database activity is handled by a class called DT. DT has a...
0
by: jags_32 | last post by:
Hello We use MFG-PRO as our ERP system which in turn uses Progress databases. In the old version of SQL 2000, using DTS packages, we used to set the code page via command prompts and execute DTS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.