Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Issue: AjaxFileUpload, does not update updatepanels. [27205]

$
0
0
I couldnt really think of a better way to describe this issue in the title so i still hope it will be considered.

Anyway, i have an AjaxFileUpload control on my page which works fine. Beneath it is an updatepanel with a listview.
The listview is databinded in the behindfile, which is a list of files uploaded by the ajaxuploader stored in the database.
So the goal is to have the listview update as soon as a new file is uploaded.
But nohing happens. I have the listview in an updatepanel, and a seperate method to set its datasource and databind it. So when the ajaxfileupload OnUploadComplete is fired, the file is stored and the method to bind the listview is called.
That is the first implementation which does not work. So far i have tried numerous variations and other methods of updating the list after a file uploade but nothing happens at all, except for pressing F5 and forcing a reload, and that defeats the purpose.

I have noticed i am not the only one with this problem: http://stephenwalther.com/archive/2012/05/01/ajax-control-toolkit-may-2012-release.aspx#comment-4826

I hope my description is sufficient and i will supply code snippets etc. on request if needed.
Comments: The thing to understand is that the upload happens in an iframe posted to the same url as the current page not by using the full postback of an updatepanel so it can never refresh the updatepanel. You could hook some javascript to the onclientuploadcomplete to reload the updatepanel. In fact during the file upload post you have no access to the state of any other controls on the page. Also although the demo site says it has ContextKeys property that allows you to pass some additional data it apparently was never implemented, it does nothing. Even looking at the source code for the control it is not used anywhere.

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>