How to run a method to read a file after this file was uploaded

2 posts, 1 answers
  1. Khoa Ho
    Khoa Ho avatar
    9 posts
    Member since:
    Feb 2009

    Posted 05 Feb 2013 Link to this post


    I can't find an event that will fire after an event ItemCommand is finished. The event handler ItemCommand (radFileExplorerEventArgs.Command == "UploadFile") is fired before a file is actually uploaded to a specified directory. After this file is saved to a server, I want to call another method to read that file.

    Thank you,
  2. Answer
    Vessy avatar
    2102 posts

    Posted 08 Feb 2013 Link to this post

    Hi Khoa,

    You could access the uploaded file in the handler of the AsyncUpload's FileUploaded Server Event (it is called after the FileExplorer's ItemCommand event):
    protected void Page_Load(object sender, EventArgs e)
        RadFileExplorer1.Configuration.EnableAsyncUpload = true;
        RadFileExplorer1.AsyncUpload.FileUploaded += new FileUploadedEventHandler(AsyncUpload_FileUploaded);
    protected void AsyncUpload_FileUploaded(object sender, FileUploadedEventArgs e)
        var uploadedFile = e.File;
        //your logic here

    Kind Regards,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top