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
 

0
dhassen
1/18/2008 11:48:30 AM
asp.net.ajax-discussion 13973 articles. 0 followers. Follow

4 Replies
297 Views

Similar Articles

[PageSpeed] 48

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
0
gt1329a
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

0
dhassen
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
0
gt1329a
1/18/2008 3:14:36 PM

 ah right, thanks anyway

0
dhassen
1/18/2008 3:20:44 PM
Reply:
Similar Artilces:

Performance Question?
Hi, I've created 2 menus by using datalist controls via sql server 2000 tables in separate user controls. However in each user control, I'm opening and closing the connection for the sql server 2000 and also in the page content as well. So actually the connection is being opened and closed 3 times for a particular page. Is this ok when concerened with performance and memory usage?  Regards,::: Hifni Shahzard Nazeer M. :::---- "If I have seen further, it is by standing upon the shoulders of giants" - Sir Isaac Newton ----- You should load the data once on page load and...

Timeout error using Database blocks
System.InvalidOperationException: Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached ---Here is the code-----   {            string connectionstring = ConfigurationManager.ConnectionStrings["CWGCartConnectionString"].ToString();            SqlDataReader reader1 = null;         ...

Detecting Progressive JPG's Uploaded
I need to know when a JPG file is uploaded whether or not it is a progressive (multi-pass) JPG or not, and then, if it IS progressive, to save the file as a non-progressive JPG. The contenttype property (myFile.PostedFile.ContentType) always returns "image/pjpeg" even when the file is not a progressive jpg. Anyone have a simple (or not-so-simple) solution? Like maybe opening the file as a stream and analyzing it or something? I don't really know where to start on this. Thanks in advance! ...

performance: standalone, isapi or aspx
Hello, I would like to take a doubt in deployment intraweb as stadalone, ISAPI and aspx which of these has better performance. Made an application for inscription of a selective to a school using the standalone, I simultanios 220 user access and it worked well. only wanted to use the ISS is best to administer since I have several applications I have no doubt about the performance of ISAPI and ASPX. -- Benilton Ramos > {quote:title=Benilton Ramos Santos wrote:}{quote} > Hello, I would like to take a doubt in deployment intraweb as stadalone, ISAPI and aspx which of these has better p...

Controllers, why not use shared functions?
Why is it that DNN did't made the functions in the controller classes Shared? IMO it should not be necessary to create a controller instance befor I can communicate with my dataprovider. For example; to retrieve all portal roles now, I should do this: Dim roleCtrl As new RoleController Dim roles As Arraylist = roleCtrl .GetPortalRoles(PortalID) But if they had made the GetPortalRoles Shared, I would not have to create a new RoleController instance first. The code would be: Dim roles As Arraylist = RoleController.GetPortalRoles(PortalID) Great question. Looking at the co...

How do you put a title on a page when using masterpages?
I'm using masterpages. When a user is view my application the tab is "untitled" is there a way to put a title on different pages?  When I try I get an error "only contents are allowed on content pages" You should add the page title in the @Page section (the first line of the file) <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"    CodeFile="Default.aspx.cs" Inherits="Default" Title="Here is my page title" %> ...

error while running execute file of powerbulider 6.0.00
! Hi everyone I Create Execute File With PowerBuilder Version 6.0.00, And Connect To DataBase With Sybase SQL Anywhere 5.0. When I Try To Run The Execute File I Get The Message "DBMS ODBC is not supported in your current installation". i can run my application with powerbuilder, but not with the execute file i already have the PBODB60.DLL intalled in my computer and the client for asa to. .Please Help Thanks. david Those are the only reasons why you would get that specific message IME. Are you sure that the PBODB60.DLL is on the path? Are you sure that t...

More work on MDN: FxOS developer settings, and Web App performance articles
Hi all, I have been keeping myself busy this week. Can I get a review/sanity = check on these? 1. I=92ve updated the Firefox OS developer settings page to be current = for v1.4: = https://developer.mozilla.org/en-US/Firefox_OS/Debugging/Developer_setting= s 2. I=92ve taken all of the rather disparate web apps performance = material we have flung all over the place, and produced something more = coherent: https://developer.mozilla.org/en-US/Apps/Developing/Performance There is a lot more that will need adding here, so suggestions are = welcome. Best regards, Chris...

Load pbl Files in Powerbuilder 11
I have inherited a PowerBuilder 7 application, and I am trying to load it in V11. All I have are 4 .pbl files, which do not open in V11. Any ideas. Thank You. First, make a backup copy of your .pbl files. In PB11 use the New wizard and choose Existing Application from the Target tab. It will migrate the libraries to PB11 format. <Steven> wrote in message news:482c528c.7289.1681692777@sybase.com... >I have inherited a PowerBuilder 7 application, and I am > trying to load it in V11. All I have are 4 .pbl files, > which do not open in V11. Any ideas. Thank You....

Performance problems with Select Max going from 11.5
We just recently upgraded a client from 11.5 to 12.0(EBF9271). The new server has more of everything(ram, 7 550mhz etc). After the updgrade we ran update statistics on all the tables. We also changed some of the tables to row level locking(which did help performance). Yet we have on issue that we still cannot figure out. In one application a Select Max is being used. Under 11.5 this SQL statement runs VERY fast. After the upgrade to 12.0 this runs VERY slow causes the application to crawl in a certain location. Here is the query: Select max(b.activityid) from activity...

Improve Intel GM45 performance in Xorg
Hi everybody. :shame: I'm having this issue since I buy my Pavilion DV5-1143LA, and here is: The performance of my Graphics in Linux its just terrible. I don't use glxgears as my benchmark because its not really accurate, so I'm using the TuxRacer game that also works on Windows. So, on Win I have a solid 55 FPS, while in Linux only 10 FPS ... The difference its from heaven to earth. This was on 11.1 with the "intel" driver. I thought that with 11.2 and a new kernel, and a new Xorg, and a new Mesa, and just a new everything this will get better, at l...

Monitoring software being installed on performance test machines
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --425Rl06E0qFj6mmMT9W9cKhRFp5Vosime Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable tl:dr: We recently installed system monitoring software on our buildbot masters, build-not-test slaves, and various other RelEng machines. IT want to continue this rollout, deploying monitoring software onto RelEng production test machines, which raises a concern about possible impact to performance numbers. If you see any production impact, please let us know. =3D=3D=3D=3D=3D=3D We are being ask...

How to tell if a file is still open for writing by another process
I want to write a routine to be run as a scheduled task in Windows which will examine a set of PDF files in a directory and when one is updated (i.e. overwritten by a more recent version) will write the file to a web server. I am unsure about the possibility of a conflict if a file in this directory is in the process of being created/written. The file in question will be a PDF written from an Excel workbook. I will want to make sure the file writing has been completed by Excel, I'm not sure if there is any way to tell if a file is not yet written and closed and available f...

Sorting data when using an ObjectDatasource
How do you sort data when using an ObjectDatasource? I have a Gridview and a ObjectDatasource in an asp.net webpage. The sorting work and the gridview talks to the ObjectDatasource without any code. But If I add a button to do the sort, lets say to sort by State, how do you do this?Do you use the SortParameterName property of the ObjectDatasource, if so how? Thanks Here is the sample code :  CODE Behind public partial class Sort : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { }     protected void Button1_Click(object sender, Ev...

Download audio/video file
  Which .net objects download audio/video file(if downloadable) from web by providing url, other then HttpWebRequest?Anyone have code example about download audio/video file?   System.Net.WebClient wc = new System.Net.WebClient(); wc.DownloadFile(new Uri(link), filepath); resolved... ...

No validation being performed
All, not sure what this is or what I could be doing. I have developed a simple app on my server at home; all works fine. I upload it to the ISP and none of the validation is working. Everything else works fine so .net is obviously there; but absolutely no validation is done. I'm using   RequiredFieldValidator   RegularExpressionValidator   CompareValidator Is there a version issue on .net that the ISP may be behind on? HELP!!! cheers Kevin...

superreview granted: [Bug 268941] Error ``tabs has no properties'' [xs] in file ``chrome://communicator/content/sidebar/sidebarOverlay.js'', line 1355, character 0. : [Attachment 165464] Patch
neil@parkwaycc.co.uk <neil.parkwaycc.co.uk@myrealbox.com> has granted Christopher A. Aillon <caillon@gmail.com>'s request for superreview: Bug 268941: Error ``tabs has no properties'' [xs] in file ``chrome://communicator/content/sidebar/sidebarOverlay.js'', line 1355, character 0. https://bugzilla.mozilla.org/show_bug.cgi?id=268941 Attachment 165464: Patch https://bugzilla.mozilla.org/attachment.cgi?id=165464&action=edit ...

Firefox 2.0.x: tracking unsuspecting users using TLS client certificates
While building the new OpenXPKI Live CD ... <shameless_plug>if you are looking for an (open source) enterprise-grade PKI system, consider OpenXPKI. You can now test development snapshots using our new Morphix-based live CD.</shameless_plug> .... I realised that you can do something with Firefox 2.0.x that you could not do with Firefox 1.5.x: track an unsuspecting user using TLS client certificates. Here is how it works: - The user visits a websites and leaves behind some personal data (for example on a registration form). - The website uses SPKAC using the <key...

Attempting to referrence UNC path getting File not found: \\ error
Hello all, I have a shared dll that we use for several in-house applications. We are legally only allowed to have this dll installed in one location. I am attempting to write a web app that also requires use of this dll. When I attempt to invoke the dll I get a File Not Found Error. I'm certain that this is due to a rights issue with ASP.Net but I don't know how to get beyond it. Where are the settings? What needs to be changed to give me access to this resource? I have read several posts that seem related but I have yet to find a post where someone has successfully gotte...

Removing port from WSDL file
Due to the arrangement we have with our firewall, our IIS server sits behind our firewall and hosts websites on different ports. When requests come though the firewall for different URLs, the firewall handles these and passes them onto the appropriate sites by their port.This is fine for everything but web services. When you try to capture a web service on a site behind the firewall, for some reason the WSDL keeps putting the port of the website in IIS in the path, and as a result, gets blocked by the firewall (because all requests go through HTTP(S)).How can I prevent the WSDL file fro...

GWTSA and log files
Hi, I was wondering how long the log files are kept in the SYSTEM\TSA directory. Is there any kind of auto purging after a certain length of time? Thanks in advance, Don Don, It appears that in the past few days you have not received a response to your posting. That concerns us, and has triggered this automated reply. Has your problem been resolved? If not, you might try one of the following options: - Do a search of our knowledgebase at http://support.novell.com/search/kb_index.jsp - Check all of the other support tools and options available at http://support.nove...

Slow performance in PB 11.1-app
Migrated from PB 9.0 to PB 11.1 (Build 8204). Using OLEDB and MSSQLserver. "Everything" in the application takes about twice as long to open after migration. Any suggestions? Hi HH; Did you change the DB Connection mechanism from PB 9.x to 11.x? -- Regards ... Chris ISUG - NA RUG Director http://chrispollach.pbdjmagazine.com <HH> wrote in message news:4967565b.3f00.1681692777@sybase.com... > Migrated from PB 9.0 to PB 11.1 (Build 8204). Using OLEDB > and MSSQLserver. "Everything" in the application takes about > twice as long to o...

15 performance
We are attempting to upgrade our 12.5.4 servers to 15.0.3. ESD#2 Our development/qa servers are Solaris 240s, solaris 10 and very similar configurations and performance. I just did an in-place install of 15 and brought up the server without issue in our development environment. post upgrade task that were completed: reorg rebuild all primary tables. update index statistics on all tables. Activated statement cache and sized. increased tempdb set devices to direct i/o after initial tests ran sp_monitorconfig and verified no reuse. The reports from my development team are th...

Small Scale Innovative Application using .NET
Hi All, I want to develop innovative application(tool) using .NET. This innovative application should help .NET developers to ease the task of development. The application should be simple enough means it should be small scaled one. I will try to develop myself. I need ideas from you people so that we can help developers. Simple example for the idea would be tool which generates DML scripts automatically for developers, just using GUI. Please provide few ideas ... Thanks Rakesh   The world can always use a better, or more intuitive, RegEx generator.  I want to...

MenuTree ContextItems calling Update panel
I have a menutree, where each item has a context menu(javascript). When a user selects an item, e.g. Edit, I want the id of the item to be passed to the user control, which will then load the associated content.At the moment,  have an update panel with my user control in it. I started off by enabling pagemethods, but as the method has to be static, i cannot then call an update to the update panel.My ultimate goal is this...Menu tree with context menu.User selects an item, which passes the item id to the user control, which then loads up the associated data from the ID. I want this all t...