473,406 Members | 2,356 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,406 software developers and data experts.

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 10074
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**********************************@microsof t.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**********************************@microsof t.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**********************************@microsof t.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_*************************@sqlwork.com> wrote in message news:ee**************@TK2MSFTNGP02.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**********************************@microsof t.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.aspx

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

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

</head>
<body>

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

<atlas:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
<atlas:UpdatePanel ID="upResults" runat="server" Mode="conditional">
<Triggers>
<atlas:ControlEventTrigger ControlID="Upload" EventName="Click" />
</Triggers>
<ContentTemplate>
</ContentTemplate>
</atlas:UpdatePanel>
<asp:FileUpload id="FileUpload" runat="server"> </asp:FileUpload>
<br /><br />
<asp:Button id="Upload" Text="Upload file" OnClick="UploadButton_Click" runat="server">
</asp:Button>
<atlas:UpdateProgress ID="uprProgress" runat="server">

<ProgressTemplate>
<img src="images/animated_loading.gif" /> Uploading....
</ProgressTemplate>
</atlas:UpdateProgress>
</form>
</body>
</html>

FileUpload2.aspx.cs

using .....;
public partial class FileUpload2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}

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

Any suggestions what might be wrong?

Thanks,
Marko Vuksanovic.

"bruce barker (sqlwork.com)" <b_*************************@sqlwork.com> wrote in message news:ee**************@TK2MSFTNGP02.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**********************************@microsof t.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
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...
2
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...
4
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...
12
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,...
1
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...
4
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>...
1
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...
3
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 ...
1
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 ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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.