This is a migrated thread and some comments may be shown as answers.

AsyncUpload + Ajax processing + .UploadedFiles property

1 Answer 137 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Jean-Pascal van der Endt
Top achievements
Rank 1
Jean-Pascal van der Endt asked on 15 Nov 2010, 06:27 PM
Hi all,

I'm using AsyncUpload with RadAjaxManager and RadBinaryImage to upload images, and preview them immediately in the page, before the Page Postback. This works fine, the preview works very well; I used the exact same setup as is shown in the "Ajax processing" sample.

However, I'd like to know which file was uploaded, when my page is posted back properly by the user. Unfortunately, the AsyncUpload1.UploadedFiles collection is empty. If I disable the RadAjaxManager.ajaxRequest() call (thereby disabling the preview), the UploadedFiles collection does work.

Is there a way to let these techniques work together? How can I retain info about the uploaded files until postback?

Thanks for any info.

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 18 Nov 2010, 03:41 PM
Hi Jean-pascal van der endt,

We've already answered to you in the other support thread, but I will share the answer here as well, for community reference.

The uploaded files are being preserved into the UploadedFiles collection only until the first postback. Since, you are doing async postback when you update the RadBinaryImage, the UploadedFiles collection is being cleared after this, because, it is expected that the files are going to be processed only ones. The good news are that, you can save the file's file name and folder inside a session object, and the access it when needed.

Kind regards,
Genady Sergeev
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
AsyncUpload
Asked by
Jean-Pascal van der Endt
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or