Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
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
 
Old June 25th, 2007, 09:23 AM
Authorized User
 
Join Date: Jun 2007
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

 
Old June 25th, 2007, 08:49 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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
 
Old June 27th, 2007, 01:37 AM
Authorized User
 
Join Date: Jun 2006
Posts: 47
Thanks: 0
Thanked 2 Times in 2 Posts
Default

hi...
this is possible if u r using AJAX.

 
Old June 27th, 2007, 06:15 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Care to share with us how would one do this using AJAX?

-Peter
 
Old June 27th, 2007, 06:17 PM
Authorized User
 
Join Date: Apr 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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. :)

 
Old June 27th, 2007, 06:39 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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





Similar Threads
Thread Thread Starter Forum Replies Last Post
upload progress bar jets Beginning PHP 1 October 1st, 2006 08:11 AM
progress bar while getting file from FTP Dhodie Pro VB 6 4 October 28th, 2004 10:15 PM
upload file, progress bar ivris Servlets 0 July 21st, 2004 06:52 AM
upload file, progress bar ivris J2EE 0 July 21st, 2004 06:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.