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

RadAsyncUpload in code behind, how to?

1 Answer 424 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 21 Jan 2016, 06:22 PM
 

My problem is, nothing happens, the code behind doesn't fire...Maybe someone could point me in the right direction. Is it possible to do something like this or am I totaly wrong here?
default.aspx:

<telerik:RadAsyncUpload ID="RadAsyncUpload1"
         runat="server"
         CssClass="async-attachment"
         MultipleFileSelection="Automatic"
         RenderMode="Lightweight"
         OnFileUploaded="UploadFiles"
         TargetFolder="../App_Themes/media"
         HideFileInput="true"
         Localization-Select="اختر الملف"
         AllowedFileExtensions=".mp4,.webm,.ogv"
>

 

Default.aspx.cs

public void UploadFiles(object sneder, FileUploadedEventArgs  e)
    {
 const string relativePath = "~/App_Themes/media";
        var filename = e.File.FileName;
        var parentID = Convert.ToInt32(GridView1.SelectedValue);
        var filesize = Convert.ToInt32(e.File.ContentLength);
        var physicalSavePath = MapPath(relativePath) + filename;
 
        //Store file info in database
            var app_FilesAdapter = new app_FilesTableAdapter();
            app_FilesAdapter.Insert(filename, relativePath + filename, parentID, 1, DateTime.Now, filesize);
 
        //Save physical file on disk
            e.File.SaveAs(physicalSavePath, true);
}

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 25 Jan 2016, 02:56 PM
Hi mohamed,

I have already answered your other ticket on the matter. Can you make the tests suggested there and see the results from them?
http://www.telerik.com/forums/radasyncupload-43d2ab4a2869

Regards,
Vessy
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AsyncUpload
Asked by
mohamed
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or