0

I am having trouble with turning this code into an Ajax form. How would I go about doing so?

@using (Html.BeginForm("", "CollaborativeProjects", FormMethod.Post, new {enctype="multipart/form-data"}))
{
     <input type="file" name="FileUpload1" /><br />
     <input type="submit" name="Submit" id="Submit" value="Upload" class="btn btn-primary" />
}
RajeshKdev
  • 6,365
  • 6
  • 58
  • 80
TheDizzle
  • 1,534
  • 5
  • 33
  • 76
  • 1
    Check these SO answers [here](http://stackoverflow.com/questions/19042116/ajax-beginform-in-mvc-to-upload-files) and [here](http://stackoverflow.com/questions/2320069/jquery-ajax-file-upload) –  Jul 16 '14 at 02:43

1 Answers1

0

Here is a jquery.form plugin

http://malsup.com/jquery/form/

if you don't want to add any plugins, you have to add submit event and write native ajax code.

Teddy
  • 787
  • 5
  • 13