I'm self-taught, so my terminology might be a little off, but I'll try to explain this prob.
Basically some people are forgetting this is an ASYNCHRONOUS uploader, using AJAX, so only the uploader is posting back to the server.
When the uploader completes and fires off the server-side onuploadedcomplete event, it cannot update the rest of the page (but you can do server-side things like save, rename, move the file, make a DB entry, etc.). That is why there are client-side/javascript
events you can specify (OnClientUploadError, OnClientUploadStarted, OnClientUploadComplete) with it that if you want anything to happen on the client side (display success text, change graphics, etc.) you have to do it using javascript.
Same thing when you try to fire off some javascript from a server-side button event when using AJAX.
Solution? You might want to remove AJAX from the page (remove updatepanel) and see if you can get it to work then. Of course then you lose the benefits of AJAX and asynchronous stuff =/
losbear
Member
16 Points
4 Posts
Re: Cannot get Asyncfileupload to fire UploadComplete event... :(
Oct 19, 2010 03:41 AM|LINK
I'm self-taught, so my terminology might be a little off, but I'll try to explain this prob.
Basically some people are forgetting this is an ASYNCHRONOUS uploader, using AJAX, so only the uploader is posting back to the server.
When the uploader completes and fires off the server-side onuploadedcomplete event, it cannot update the rest of the page (but you can do server-side things like save, rename, move the file, make a DB entry, etc.). That is why there are client-side/javascript events you can specify (OnClientUploadError, OnClientUploadStarted, OnClientUploadComplete) with it that if you want anything to happen on the client side (display success text, change graphics, etc.) you have to do it using javascript.
Same thing when you try to fire off some javascript from a server-side button event when using AJAX.
Solution? You might want to remove AJAX from the page (remove updatepanel) and see if you can get it to work then. Of course then you lose the benefits of AJAX and asynchronous stuff =/
Hope this helps.