Visual studio feeds

All Visual Studio blogs in one place


Enter your email address:

Delivered by FeedBurner

Increase your website traffic with



Anti-spam: How many eyes has a typical person?

Follow us on FB


File Upload in ASP.NET MVC3

AddThis Social Bookmark Button
If you are a web developer you often need to upload file on the web server or database. In today’s post I am going explain how we can upload file in ASP.NET MVC 3 with razor syntax. So, first thing we need to create a view that will contain the file upload control. I am going to use an existing mvc template for this demo. So I have just modified the default Index view like following. @{ ViewBag.Title = "Home Page"; }


To learn more about ASP.NET MVC visit MVC Website">

@using (Html.BeginForm("Index", "Home", FormMethod.Post, new { enctype = "multipart/form-data" })) { }

Here you can see that I have used Html.Begin form to create a form with multipart as we all know this attribute is required to have to upload any kind of file to the server. Also I have used the simple HTML file control...(Read whole news on source site)

Home : Blog List : DotNetJaps : File Upload in ASP.NET MVC3