AsyncUpload in Mvc application

2 posts, 0 answers
  1. Sandhya
    Sandhya avatar
    1 posts
    Member since:
    Nov 2012

    Posted 07 Nov 2012 Link to this post

    I am trying to use the AsyncUpload in an MVC application. Added the control to a view and all the client side validations worked fine. I am not able to figure out how to get my FileUploaded event handler triggered on file upload.

    I added the following Action to one of the controllers, managed to get the submitted file through the form collection.
    public ActionResult UploadFileToServer(FormCollection form)

    I am recieving something like the following as part of the form["RadAsyncUpload1_ClientState"] member.

    {'isEnabled':'true','uploadedFiles':[{"fileInfo":{"FileName":"New Text
    This seems like json representation of the FileUploadedEventArgs. Can someone let me know how to create the FileUploadedEventArgs type object with this, so that I can process the file contents?

    Let me know if there is any other supported way of dealing with this control in MVC applications.
  2. Peter Filipov
    Peter Filipov avatar
    1028 posts

    Posted 09 Nov 2012 Link to this post

    Hello Sandhya,

    The information that you get is the client state of the RadAsyncUpload control. It contains encrypted and summarized information about the uploaded files. I am afraid that is not possible to recreate FileUploadedEventArguments in the controler.

    Peter Filipov
    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top