RadAsyncUpload in code behind, how to?

2 posts, 0 answers
  1. mohamed
    mohamed avatar
    2 posts
    Member since:
    Jan 2016

    Posted 21 Jan Link to this post

     

    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);
    }

  2. Vessy
    Admin
    Vessy avatar
    1382 posts

    Posted 25 Jan Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top