RadasyncUpload upload file from code behind

Thread is closed for posting
2 posts, 0 answers
  1. Siva
    Siva avatar
    35 posts
    Member since:
    Mar 2013

    Posted 28 Jul 2014 Link to this post

            I have a scenario in which I need to upload some files which are in Session variable to RadAsyncUpload. Please help me with a code I used this but it shows casting error.

    <telerik:RadAsyncUpload ID="FileUploadTest" MultipleFileSelection="Automatic" OnClientFileUploading="onClientFileUploading" PostBackTrigger="btnSubmitChennai"  
                        OnClientValidationFailed="OnClientValidationFailed" AllowedFileExtensions=".pdf,.doc,.docx,.xls,.xlsx,.csv,.txt,.rtf,.mp3,.wma,.mpg,.flv,.avi,.jpg,.jpeg,.png,.gif,.tiff,.xps,.zip"
                        AllowedMimeTypes="application/pdf, application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, text/csv, text/plain, application/rtf, audio/mpeg3, audio/x-mpeg-3, video/mpeg, video/x-mpeg, audio/x-ms-wma, audio/mpeg, video/mpeg,video/x-flv, video/x-msvideo, image/jpeg, image/png, image/gif, image/tiff, application/vnd.ms-xpsdocument,application/zip, application/x-compressed, application/x-zip-compressed"


    FileUploadTest= (UploadedFile)Session["FileUpload1"];

    I used this also

    FileUploadTest= (RadAsyncUpload)Session["FileUpload1"];
  2. Plamen
    Plamen avatar
    2925 posts

    Posted 31 Jul 2014 Link to this post

    Hello Siva,

    I have inspected the code provided but could not find out what "FileUpload1" and what actually are you trying to achieve in the code behind.

    One possible way to get the uploaded file when using RadAsyncUpload is to use OnFileUplaoded event.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top