upload multiple files to database

2 posts, 0 answers
  1. Arun
    Arun avatar
    13 posts
    Member since:
    May 2013

    Posted 21 Jun 2013 Link to this post


              I want to upload multiple  files using asyncupload rad control to database.Please give me a solution to get multiple file name of  uploaded files to store in database & store files in project folder.

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 Jun 2013 Link to this post

    Hi Arun,

    Please have a look at this thread which deals with uploading multiple files. To store the uploaded files in the project folder, set the desired folder name in your Project directory to the RadAsyncUpload's TargetFolder property.The RadAsyncUpload1_FileUploaded method is repeatedly called until all the valid files are uploaded on the target. Using e.File.FileName you can get the file name and you can write your own logic to feed the data in the database. Another option I have tried is you can use a RadListBox to store all the uploaded file names so that you can use it a later point such as saving in database.

    protected void RadAsyncUpload1_FileUploaded(object sender, FileUploadedEventArgs e)
        string targetfolder = RadAsyncUpload1.TargetFolder;
        e.File.SaveAs(Path.Combine(Server.MapPath(targetfolder), e.File.FileName));
        RadListBoxItem item = new RadListBoxItem(e.File.FileName); //create a RadListBoxItem and store the FileName in it.

  3. DevCraft R3 2016 release webinar banner
Back to Top