Changing filename at Selection is possible in AsyncUpload?

2 posts, 0 answers
  1. Geetha
    Geetha avatar
    13 posts
    Member since:
    Jul 2012

    Posted 10 Oct 2012 Link to this post

    Hi All,

                I am using RadASyncUpload control to upload the files. But I wanted to give my own name to the file, while uploading. Is it possible? If anybody knows, can you please let me know.


    Thanks,
    Geetha Rani.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Oct 2012 Link to this post

    Hi Geetha,

    Try the following code to achieve your scenario.

    C#:
    protected void RadAsyncUpload1_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
    {
     string targetFolder = RadAsyncUpload1.TargetFolder;
     e.File.SaveAs(Path.Combine(Server.MapPath(targetFolder), "newName" + e.File.GetExtension()));
    }

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top