 |
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

June 25th, 2007, 09:23 AM
|
Authorized User
|
|
Join Date: Jun 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Help me to show progress bar during file upload
hi,
how can i show progress bar when i am uploading files to web sever
in asp.net application.
Please,any of you give solution.
Thank You,
Subhashini Palanivel.
|

June 25th, 2007, 08:49 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Short answer: you can't.
When you upload a file, the browser is appending the file binary data to the form post information. Your application won't even start processing the request until it has been completely received by the server. This means that if you upload a file that takes 10 seconds to travel to the server, your application will not start responding to the request for 10 seconds after the user hits the submit button. Unfortunately there isn't anything you can do about this behavior.
- Peter
|

June 27th, 2007, 01:37 AM
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
|
|
hi...
this is possible if u r using AJAX.
|

June 27th, 2007, 06:15 AM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Care to share with us how would one do this using AJAX?
- Peter
|

June 27th, 2007, 06:17 PM
|
Authorized User
|
|
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am wondering how this can be done via AJAX also. To make this work, you will have to use an external application other than the browser that can track upload count.
AJAX can only be monitored by states. Completed, Incompleted, Error, and TimeOut. Those states are the current status of the AJAX request if it got through and processed or not. From this you still can't get the ticks of a file uploading. I may have added an extra state, been awhile since I did any manual AJAX stuff. :)
|

June 27th, 2007, 06:39 PM
|
 |
Friend of Wrox
|
|
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
|
|
Quick209,
I'm going to agree with you there. At the end of the day, HTTP is still HTTP. Unless I'm mistaken and there are new features to the standard DOM, you can't monitor the progress of an HTTP request (whether or not it's AJAX) as you suggest.
- Peter
|
|
 |