Performing File Upload using update panel and update progress

 Hi guys

I'm totally new to ajax, and Im using vs2005 and ajax 1 with .net 2.0

I've created a form for my application that allows a user to upload a file to a database. The form contains a fileupload, a button (that invokes the insert) and a repeater that lists all the files currently stored. This works great.

Now I want to use ajax to display an 'uploading...' message and animation to displaye while the file is being uploaded. Depending on the file, uploading can take quite a while, and I wanted to include some feedback to the user to let them know what's happening. I've gone through the ajax tutorial videos on getting started and using update panels etc, as well as on the update progress feature. I cnat seem to get it to work.

I first placed the repeater inside the update panel, and set up a trigger for my upload button. This didnt work. I've tried including all my controls inside the update panel, some in some out, and a few different combinations. Files are no longer uploading, (when I'm including update panels) and the update progress does nothing.

Can anyone give me a few pointers on where I should be placing the update panel, and which of my controls should go inside for both my normal functionality and my progress to work properly.

Thanks in advance

1/18/2008 11:48:30 AM 13973 articles. 1 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 10

You're not going to be able to do that easily.  The only way to provide async file uploads is to put the upload element in an iframe.  Unless you use a PostbackTrigger to force a full postback, it won't work in an UpdatePanel, by design.

Encosia - ASP.NET, AJAX, and more.

Latest article: Using complex types to make calling services less… complex
1/18/2008 2:28:23 PM

 thanks for your reply. I've already applied a Postback trigger, which of course allows the upload, but takes away the functionality of the aysnc postback and the update prorgress. This means I may as well stick with what I had before. All I really want is some feedback while the file is being uploaded. Clearly it's not as simple as I thought!!! Thanks for the link, that was helpful. How would I go about using an iframe in the manner you mention? Thanks

1/18/2008 2:42:00 PM

You just place the upload element in an iframe that's sized to inconspicuously contain it.  So, then it appears that the upload happens asynchronously.

However, that method won't get you any closer to an upload progress indicator, unfortunately.   

Encosia - ASP.NET, AJAX, and more.

Latest article: Using complex types to make calling services less… complex
1/18/2008 3:14:36 PM

 ah right, thanks anyway

1/18/2008 3:20:44 PM

Similar Artilces:

Performance Issues using 10 AJAX Update Panels
Hello        I am having speed issues with one of my pages that has 10 update panels.        Each panel has a number of text boxes (with postback) that accept numerical values and update other parts of the page.        I conditionally update only those panels that need to be refreshed but it is still too slow.        I use fiddler to monitor the traffic and still see a large chunk of HTML being returned between 35KB and 55KB.      &nb...

Problem with File Upload using AJAX Update Panel
Hello Friends,    I have an default.aspx page.In that page i have included an user control named Upload.ascx. In Upload.ascx i have the fileupload control and upload button.My friends told me to use the below code  <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">    <ContentTemplate><asp:FileUpload id="FileUpload1"                            runat=&qu...

Ajax Update Panel and Update Progress
Hello Everyone,  Its been long time since i have visited this forum, but i have a query regarding the update panel. I have a strange and weard situtaion here, which is only occuring on the web hosting server and it works absolutely fine on VSS (Local) server. The situation is i have an application where Web User Controls are placed on the web page at the design time, they are made Visible true/false at the run time. The Page where controls are placed contains the update panel and the User controls Indvidually too contains the Update Panel. These update Panel are associated with u...

Having an issue using JavaScript to update an Update Panel with Multiple Update Panels
I am using JavaScript via the '__doPostBack' command passing in the 'ClientID' of my UpdatePanel to do a partial page postback.  This fires the UpdatePanel_PreRender event (or any other UpdatePanel event) where I run server side code. The actual partial page postback is working as expected, but since partial postbacks follow the full page lifecycle, ALL of my UpdatePanel events are firing which I do not want.  What ends up happening is the code in the other UpdatePanel '_PreRender' event is being called too which I do not want to occur. Is there a way aroun...

AJAX update panel updating all panels!
Hey there, I have 2 updated panels on a page update panel1 and update panel2. One is triggerd by a list box and the other is triggered by an image button,, the only problem is although each trigger is assigned to their respective list boxes, whenever a trigger is activated it refreshes both update panels, which is not what I want.  This is my update panel refreshed by the image button   <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <TABLE id="Table6" style="WIDTH: 208px; HEIGHT: 248px" cellSpacing="1" cellPadding="1" width="208" border=...

Ajax :Update Panel File Uploader!
Hi ,Im using the Update Panel which contains the FileUploadControl but am not able to upload any Image.I do not get any error..!!!Could anyone please suggest me with the same..Thanks n Regards,Francis   Ferns Hi, Update panel is not supporting file upload. plz go thru this fileupload  hope this helpsWith LuvDhanaDont forget to mark as answer if my reply helped you... Hi, According to the docs, the UpdatePanel doesn't support the FileUpload control. However, "To use a FileUpload control inside an UpdatePanel control, set the postback control that sub...

How to use the Update Panels and Update progress bars in aspx page?
Hi , Usage of update panels in the aspx pages? Thanks, Venugopal Anthana   Hi, take a look at the samples of the official documentation:  Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons....

updates, updates, updates
Name: hans jensen Email: hansjensen44_athotmaildotcom Product: Firefox Summary: updates, updates, updates Comments: why is it everytime i go online firefox has new updates, 3 -4 times every day, its never ending..........whats all the problems??? please email me and let me know, ty,.........Hans Jensen Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20070219 Firefox/ ...

updates, updates, updates, NO MORE!
Name: Andreas Email: unbekanntatjokerdotms Product: Firefox Summary: updates, updates, updates, NO MORE! Comments: Hi ! if you want to develop a fine webbrowser, maybe you nee a new management. To release a new buggy version every two weeks is not very professional. Test your software before the release and let the user download a stable browser. this update-orgy since 2.0.0 used me to use Opera instead of FF. We haved use FF in our Company, but we can't deploy a new version every week to +200 Windows-clients, so in our company we've decided to return to IE, ...

Ajax Update Panel not Updating
I have asp page with one update panel. Inside update panel there is a button and a label control. when I click button and try to updatel label.text="something" it works. But what I am trying to do is on button click I create FileSystemWatcher object and register its changed event. Now whenever I changed my text file changed event gets fired and inside this changed event I am trying to Update label.text="Something". This time it does not work. Can someone tell me what should I do to get this work. Here is the sample code DisplayLog.aspx <%@ Page Language="C#&qu...

Updates Updates Updates
I was a big fan of Firefox.. Now, I don't even like to use it. Seems like every time I start it up I have to update some addin OR the browser itself. And unfortunately the update nag messages are always presented when I start a browsing session. I find this annoying because, typically, when I open a web browser all I want to do is go to a web page. Not update the browser. I can agree that staying current with the latest version could give the best, fastest, safest web experience. But that point becomes mute when I start off every other browsing session with a new update. And mos...

Update panel and update progress
Hello everyone, I am having a problem with an update progress which is in an update panel. With an AsyncPostBack it gives an error with: workbook.SaveAs("Excel.xls", ExcelSaveType.SaveAsXLS, Response, ExcelDownloadType.PromptDialog) in the code behind; however if I use <asp:PostBackTrigger> it works ... But when I use PostBackTrigger, it doesn't display the update progress. Does anyone happen to know why?<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Excel.aspx.vb" Inherits="_Excel" %> <!DOCTYPE html PUBLIC ...

disable button while processing using Update Panel & Update Progress
I used this code below to disable the button while processing 'Build Function to submitDim sb As New System.Text.StringBuilder() sb.AppendLine("function doSubmit(btn){")sb.AppendLine(ClientScript.GetPostBackEventReference(Me.Button4, [String].Empty)) 'control to disablesb.AppendLine("if(btn !=null) {") sb.AppendLine("btn.disabled='disabled';")sb.AppendLine("}") sb.AppendLine("return false;")sb.AppendLine("}") ClientScript.RegisterStartupScript(Me.[GetType](), "customPB", sb.ToString(), True) Me....

Updates, updates and more updates
Name: pirhan Email: pirhan_chanathotmaildotcom Product: Firefox Summary: Updates, updates and more updates Comments: Hello, Normally I use Safari, but my iBook is out of commission for a while. So, I am forced to use a PC to which I would much rather use Firefox than Internet Exploder. However, as much I enjoy not using a Microsoft product, and use a product that works decently, I am severely annoyed about the constant updates I am put through. In the last two days, I had to wait for Firefox to install updates before I could browse and now, I'm alerted that there'...

Web resources about - Performing File Upload using update panel and update progress -

University of Music and Performing Arts, Vienna - Wikipedia, the free encyclopedia
The University of Music and Performing Arts, Vienna ( German : Universität für Musik und darstellende Kunst Wien , abbreviated MDW ) is an Austrian ...

Demi Lovato falls on stage while performing Cool For The Summer - video
DEMI Lovato fell flat on her back during a gig at New York City’s iconic Madison Square Garden venue on Friday night.

Molybdenum this year's worst-performing commodity
An obscure metal used to make steel has become this year's worst-performing commodity.

You think AFL coaches face pressure: what about principals of high-performing state schools?
Being a high-achieving non-selective state school produces high demand for places and a lot of pressure to keep improving results. Meet Pitsa ...

The Revenant: Actor Grace Dove talks about performing with Leonardo DiCaprio
The B.C. First Nations actor who plays Leonardo DiCaprio's wife in The Revenant says she had nothing but great experiences working opposite the ...

Internet in tears over video of kids choir performing Arabic welcome song
It’s a shaky and grainy video, but its message is what has the Internet in tears.

How Are Presidential Candidates Performing on YouTube?
With a GOP debate tomorrow night , we decided to check in and see how Republican presidential candidates are performing on YouTube. To no surprise, ...

Here Are the Best- and Worst-Performing Assets of 2015
From currencies to corporate bonds. As 2015 draws to a close, it's time to tally up the best- and worst-performing investments of the year. ...

Laurie Anderson performing in Times Square tonight for dogs; 'Heart of a Dog' excerpt is this month's ...
As you may have already seen, a three-minute excerpt of Laurie Anderson's Heart of a Dog film is being shown on Times Square billboards every ...

Studios are making billion-dollar deals with Netflix, but they have almost no idea how their shows are ...
... Why not?” The answer, of course, is that Netflix would then lose an enormous advantage. With a studio knowing how its content is performing, ...

Resources last updated: 1/9/2016 6:03:23 AM