AsyncUpload + Ajax processing + .UploadedFiles property

2 posts, 0 answers
  1. Jean-Pascal van der Endt
    Jean-Pascal van der Endt avatar
    48 posts
    Member since:
    Jul 2010

    Posted 15 Nov 2010 Link to this post

    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.
  2. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 18 Nov 2010 Link to this post

    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.
Back to Top