473,715 Members | 3,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File Upload Progress Indicator ?

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?

Jun 23 '06 #1
6 10100
why don't you have an Animated GIF in the UpdateProgress Panel ?

--

Bruno Alexandre
(a Portuguese in Kobenhanv, Danmark)


"Marko Vuksanovic" <ma************ *@hotmail.com> escreveu na mensagem news:B2******** *************** ***********@mic rosoft.com...
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?

Jun 23 '06 #2
if you do a google search for Ajax progress bar you'll find lots of examples, like this one.

http://www.wilcob.com/Wilco/Default/159/showpost.aspx

-
Regards

John Timney (MVP)
"Marko Vuksanovic" <ma************ *@hotmail.com> wrote in message news:B2******** *************** ***********@mic rosoft.com...
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?

Jun 23 '06 #3
this will be tricker than you may think. ajax progress bars work by polling the server for status of the operation. to poll the status of an upload you need to poll the server for how far along it is. there are a couple issues

1) as IIS streams the request to asp.net, asp.net does not give a handy way to get the request stream in progress. you will proably have to write an isapi filter to get the number of bytes transfered.

2) the client may not send the size of the file, so the server will not know how big it is to calc how far along the transfer is.

3) while the request (upload) is in progress, the browser may not allow the ajax code to make another request.

-- bruce (sqlwork.com)
"John Timney (MVP)" <x_****@timney. eclipse.co.uk> wrote in message news:Hu******** *************** *******@eclipse .net.uk...
if you do a google search for Ajax progress bar you'll find lots of examples, like this one.

http://www.wilcob.com/Wilco/Default/159/showpost.aspx

-
Regards

John Timney (MVP)
"Marko Vuksanovic" <ma************ *@hotmail.com> wrote in message news:B2******** *************** ***********@mic rosoft.com...
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?

Jun 23 '06 #4
Thank you all very much for the suggestions,

The UpdateProgress Panel is actually good enough. All I want to achieve is to notify the user that the file is being uploaded and that they need to wait a while.

Best regards,
Marko Vuksanovic.
"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com> wrote in message news:ee******** ******@TK2MSFTN GP02.phx.gbl...
this will be tricker than you may think. ajax progress bars work by polling the server for status of the operation. to poll the status of an upload you need to poll the server for how far along it is. there are a couple issues

1) as IIS streams the request to asp.net, asp.net does not give a handy way to get the request stream in progress. you will proably have to write an isapi filter to get the number of bytes transfered.

2) the client may not send the size of the file, so the server will not know how big it is to calc how far along the transfer is.

3) while the request (upload) is in progress, the browser may not allow the ajax code to make another request.

-- bruce (sqlwork.com)
"John Timney (MVP)" <x_****@timney. eclipse.co.uk> wrote in message news:Hu******** *************** *******@eclipse .net.uk...
if you do a google search for Ajax progress bar you'll find lots of examples, like this one.

http://www.wilcob.com/Wilco/Default/159/showpost.aspx

-
Regards

John Timney (MVP)
"Marko Vuksanovic" <ma************ *@hotmail.com> wrote in message news:B2******** *************** ***********@mic rosoft.com...
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?

Jun 24 '06 #5
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 might be wrong?

FileUpload2.asp x

<%@ Page Language="C#" AutoEventWireup ="true" CodeFile="FileU pload2.aspx.cs" Inherits="FileU pload2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title> drag </title>

</head>
<body>

<form id="f1" enctype="multip art/form-data" runat="server">
<h4>Select a file to upload:</h4>

<atlas:ScriptMa nager ID="ScriptManag er1" runat="server" EnablePartialRe ndering="true" />
<atlas:UpdatePa nel ID="upResults" runat="server" Mode="condition al">
<Triggers>
<atlas:ControlE ventTrigger ControlID="Uplo ad" EventName="Clic k" />
</Triggers>
<ContentTemplat e>
</ContentTemplate >
</atlas:UpdatePan el>
<asp:FileUplo ad id="FileUpload " runat="server"> </asp:FileUpload>
<br /><br />
<asp:Button id="Upload" Text="Upload file" OnClick="Upload Button_Click" runat="server">
</asp:Button>
<atlas:UpdatePr ogress ID="uprProgress " runat="server">

<ProgressTempla te>
<img src="images/animated_loadin g.gif" /> Uploading....
</ProgressTemplat e>
</atlas:UpdatePro gress>
</form>
</body>
</html>

FileUpload2.asp x.cs

using .....;
public partial class FileUpload2 : System.Web.UI.P age
{
protected void Page_Load(objec t sender, EventArgs e)
{
}

protected void UploadButton_Cl ick(object sender, EventArgs e)
{
// Specify the path on the server to save the uploaded file to.
String savePath = @"C:\Temp\uploa ds\";
// Before attempting to perform operations on the file, verify that the FileUpload control contains a file.
if (FileUpload.Has File)
{
String fileName = FileUpload.File Name;
savePath += fileName;
// Call the SaveAs method to save the uploaded file to the specified path.
FileUpload.Save As(savePath);
// Notify the user of the name of the file was saved under.
// UploadStatusLab el.Text = "Your file was saved as " + fileName;
}
else
{
// Notify the user that a file was not uploaded.
// UploadStatusLab el.Text = "You did not specify a file to upload.";
}
}
}

Any suggestions what might be wrong?

Thanks,
Marko Vuksanovic.

"bruce barker (sqlwork.com)" <b_************ *************@s qlwork.com> wrote in message news:ee******** ******@TK2MSFTN GP02.phx.gbl...
this will be tricker than you may think. ajax progress bars work by polling the server for status of the operation. to poll the status of an upload you need to poll the server for how far along it is. there are a couple issues

1) as IIS streams the request to asp.net, asp.net does not give a handy way to get the request stream in progress. you will proably have to write an isapi filter to get the number of bytes transfered.

2) the client may not send the size of the file, so the server will not know how big it is to calc how far along the transfer is.

3) while the request (upload) is in progress, the browser may not allow the ajax code to make another request.

-- bruce (sqlwork.com)
"John Timney (MVP)" <x_****@timney. eclipse.co.uk> wrote in message news:Hu******** *************** *******@eclipse .net.uk...
if you do a google search for Ajax progress bar you'll find lots of examples, like this one.

http://www.wilcob.com/Wilco/Default/159/showpost.aspx

-
Regards

John Timney (MVP)
"Marko Vuksanovic" <ma************ *@hotmail.com> wrote in message news:B2******** *************** ***********@mic rosoft.com...
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?

Jun 24 '06 #6
Hi

unfortunately you cannot use fileupload controls in update panels.
Just remove the update panel or try this workaround which i don't like
very much :-)

http://forums.asp.net/thread/1321664.aspx

mike

Jun 26 '06 #7

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

Similar topics

3
4895
by: Frantisek Fuka | last post by:
My application uses ftplib to upload files to remote server. What is the cleanest way to provide progress indicator for long files? What exactly should I override in the ftplib (I am not very proficient in the FTP protocol)? Thanks -- Frantisek Fuka (yes, that IS my real name)
2
2515
by: Dave | last post by:
Greetings. Ive been trying to figure out how I can write to a file from an HTTP post while it is being uploaded. So far ive realized that my script isn't getting the data until the browser is done uploading. What I want to accomplish is a way to track the progress of a file upload. I'm guessing that if I can get it to write to a file as it is uploaded I can load another browser to check the progress of the transfer (by refreshing). ...
4
5728
by: Kenneth Keeley | last post by:
Hi, I have a page that uploads files to my server and I wish to display a "Please wait while uploading" page to the user while the file is uploading. I have been able to redirect the user once the file is finished uploading but am not sure how to do it while file is uploading. Some sample code would be welcomed with open arms. Thank You.
12
7789
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,...
1
2205
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? A link to example would also be useful. Thanks, Marko Vuksanovic.
4
9686
by: Marko Vuksanovic | last post by:
I am trying to cause the uplaod button, id="Upload",when clicked, to exectue the onClick event for Button1, id="Button1". <asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload> <asp:Button id="Upload" Text="Upload file" runat="server"> </asp:Button> <asp:Button id="Button1" OnClick="UploadButton_Click" runat="server" Visible="false"> in the code behind file I am using the following code to add the __doPostBack to the...
1
1429
by: M.V. | last post by:
I'm trying to implement a progress indicator using atlas. Note that this indicator does not have to reflect the real progress but just to let the user know that the something is being done so that the user does not close the page as he/she might think that the web application stopped responding. I realize that the file upload control does not work with the update panel but is there any other way to show the progress indicator (just an...
3
4512
by: kksandeep | last post by:
i am using this three files to uplod file. i got this file from net but i think these have some error. i am new to this field plz help the script i found is some helpful but not too that i need my objective is this that when i uplod a file it should be desply on same page with ajax uplod after when i refresh page this should be not remains longer and on clicking other image its replase previous image plz help how i can do this the...
1
3952
by: kksandeep | last post by:
i am using this three files to uplod file. i got this file from net but i think these have some error. i am new to this field plz help the script i found is some helpful but not too that i need my objective is this that when i uplod a file it should be desply on same page with ajax uplod after when i refresh page this should be not remains longer and on clicking other image its replase previous image plz help how i can do this the...
0
8821
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9340
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9196
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
9103
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
9047
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
7973
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
6646
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
5967
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
4738
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.