473,769 Members | 8,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file uploads with progress bar

Ok,

I know how to upload a file in asp.net using the <input
type="file" runat="server"> control. What I don't know
how to do is monitor the progress of the upload so that I
can show the end-user a progress bar, or something.

Anyone have any ideals or can point me to a sample?

Thanks,
Todd
Nov 17 '05
14 1979
Thanks Luke,

"MSFT" <lu******@onlin e.microsoft.com > wrote in message
news:m$******** ******@cpmsftng xa06.phx.gbl...
Hi todd,

I agree with Marina that there may not be an easy way to implement in ASP.NET. Since the Progress bar locate on client side, it needs to communicate with server side to determine the progress. However, when you upload a file, you just send a request to server side and wait for response. There is no channel for transfering progress information during upload.

Normally, there are two weak work around for this issue:

1. Embeding some third party ActiveX control in the web page and use it to upload file. The third party activex control will upload the file with sockets and display a progress bar.

2. Display a mendacious progress bar like a GIF picture, or a progress bar like:

For i=1 to 10000

Progressbar.pos ition= Progressbar.pos ition+1
loop

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no rights.)

Nov 17 '05 #11
I have tried this idea and I think it might work. but could you give a more
complete example of the code in both pages. I have been able to open the new
window but how do I close it when the upload is finished. Also what stops
the progress bar from being displayed if the form is invalid.

"Todd Denlinger" <to**@psiware.c om> wrote in message
news:O7******** ******@TK2MSFTN GP10.phx.gbl...
Thanks Marina

You may be right, a progress bar may be fairly complex.
However, it looks like you can open another window using
javascript and
<form id="Upload" method="post" runat="server"
onsubmit="OnUpl oad()">

then closing the javascript window after the upload by using

<body ms_positioning= "FlowLayout " onunload="OnUnl oad()">

It wouldn't be a progress bar, but you'd have an animated
gif at least.

Regards,
Todd

Nov 17 '05 #12
I have tried this idea and I think it might work. but could you give a more
complete example of the code in both pages. I have been able to open the new
window but how do I close it when the upload is finished. Also what stops
the progress bar from being displayed if the form is invalid.

"Todd Denlinger" <to**@psiware.c om> wrote in message
news:O7******** ******@TK2MSFTN GP10.phx.gbl...
Thanks Marina

You may be right, a progress bar may be fairly complex.
However, it looks like you can open another window using
javascript and
<form id="Upload" method="post" runat="server"
onsubmit="OnUpl oad()">

then closing the javascript window after the upload by using

<body ms_positioning= "FlowLayout " onunload="OnUnl oad()">

It wouldn't be a progress bar, but you'd have an animated
gif at least.

Regards,
Todd

Nov 17 '05 #13
One more solution which might be helpful is to have a anim gif within a
layer and the form within another layer. Hide the form layer and make the
layer containing anim gif visible when the submit button is clicked. In this
case you don't need to open a pop up window.

Reddy
"Kenneth Keeley" <ke*******@hotm ail.com.nowhere > wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
I have tried this idea and I think it might work. but could you give a more complete example of the code in both pages. I have been able to open the new window but how do I close it when the upload is finished. Also what stops
the progress bar from being displayed if the form is invalid.

"Todd Denlinger" <to**@psiware.c om> wrote in message
news:O7******** ******@TK2MSFTN GP10.phx.gbl...
Thanks Marina

You may be right, a progress bar may be fairly complex.
However, it looks like you can open another window using
javascript and
<form id="Upload" method="post" runat="server"
onsubmit="OnUpl oad()">

then closing the javascript window after the upload by using

<body ms_positioning= "FlowLayout " onunload="OnUnl oad()">

It wouldn't be a progress bar, but you'd have an animated
gif at least.

Regards,
Todd


Nov 17 '05 #14
Ok then, How do I do that. I would like to see the code to produce one of
these results.

"Reddy" <gk******@adsgr oup.com> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..
One more solution which might be helpful is to have a anim gif within a
layer and the form within another layer. Hide the form layer and make the
layer containing anim gif visible when the submit button is clicked. In this case you don't need to open a pop up window.

Reddy

Nov 17 '05 #15

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

Similar topics

7
2444
by: OneSolution | last post by:
Hi All, Here's one thing that I don't know much about - file uploading. As part of my project, I will have to build a file manager of sorts - perhaps a document manager. Anyhow, this involves allowing my user to upload files to a location. I know PHP can do it - I know this because it sure does everything else ... but I don't know this from any authoritative source.
9
2377
by: R. Rajesh Jeba Anbiah | last post by:
Q: How should I handle file upload? A: File uploading requires HTML form of content type "multipart/form-data". The file content has to be POSTed/submitted via the form and once the file is uploaded, it will be available at the "upload_tmp_dir" (usually /tmp) directory. Then you may move that file to another directory using move_uploaded_file(); file name will be available in the superglobal $_FILES. Refer:...
1
3532
by: Doug Helm | last post by:
Hey, Folks: I'm writing a CGI to handle very large file uploads. I would like to include a progress bar. I think I'm about done. I have code to handle the file upload, and I think I can add an IFrame to my page which posts to check file size (so I can tell how many bytes have been received). My problem is that I want to provide a % complete. In order to do that, of course, I need to know not only the number of bytes received, but...
0
1394
by: Manuel | last post by:
I have a page that uploads a file to the user. Since the file is created on the fly and it takes a few seconds to generate, I present a "Please Wait" screen until the file is uploaded. This is the code on the wait page: -------------- <script language="javascript"> var iLoopCounter = 1; var iMaxLoop = 5; var iIntervalId;
12
7801
by: JMB | last post by:
Hello, I was wondering if anyone knew of any projects extending the inline upload progress bar to utilize an inpage image uploader with bar, without having to refresh or go to a seperate page, nor opening a second box for display of the progress bar. I had been using the MegaUpload that was adapted from Raditha's script at http://www.raditha.com/upload.php . The MegaUpload script I have been using takes the progress bar inpage,...
6
10104
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 it possible to implement it using some other control, for example a floating window?
5
2297
by: LtCommander | last post by:
Hello all, 1. I am a little new to ASP.NET, so please bear with me. 2. I am trying to create a very simple website which requires an upload box (end user file sizes may be anywhere between 1MB to 10 MB). 3. I would also like to show a progress bar so that the user can see the progress of what he is uploading.
3
19883
by: markus.rietzler | last post by:
i want to do (multiple) file upload(s) and display a progress bar. with firefox and safari it is no problem at all. only IE makes some problems. my script is based on ajax-uploader, which can be found at www.srmiles.com/freestuff/ajax_file_uploader/ . you can do multiple file uploads. each upload will have it's own "form"-tag, so that each file is uploaded for its own. could be a good solution if there are "big" uploads.
1
47484
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click on a link and after a moment or two a file download dialog box pops-up in your web browser and prompts you for some instructions, such as “open” or “save“. I’m going to show you how to do that using a perl script. What You Need Any recent...
0
10049
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9998
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9865
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8876
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7413
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5310
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3967
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 we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.