EasyHostingASP.NET | Best and cheap ASP.NET MVC hosting. In this post we will see how we can upload file without page refresh. As we know, in MVC there is no server controller, this sample will be useful if we want to upload files without page refresh.

file-upload

If you already know normal file upload, just adding jquery.form.js plugin and few lines of code will do the trick.

In MVC, even html input type “file” is used to upload files but if we want to upload without page refresh, then either we can use Ajax.BeginForm or ajax post. There is a jquery plugin called jquery.form.js which makes the ajax post easy without making it complicated.

Follow these steps to do it.

View Page

Add the required jquery and form library into your page.

Alexia Pamelov