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

RadasyncUpload upload file from code behind

1 Answer 69 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Siva
Top achievements
Rank 1
Siva asked on 25 Jul 2014, 10:47 AM
Hi,
        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.
aspx:

<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"
                    runat="server">
                </telerik:RadAsyncUpload>

aspx.cs

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

I used this also

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



1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Jul 2014, 07:30 AM
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.

Regards,
Plamen
Telerik
 

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.

 
Tags
General Discussions
Asked by
Siva
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or