可以参考 http://www.cnblogs.com/CareySon/archive/2009/12/23/1630902.html
//Index.cshtml 视图
@model IEnumerable<SafetyValveForMobile.Models.BusinessModel>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<form action="Upload" method="post" enctype="multipart/form-data">
<input type="file" name="file" /><br />
<input type="submit" name="Submit" id="Submit" value="Upload" />
</form>
<p>
@Html.ActionLink("Create New", "Create")
</p>
//控制器类,可以用Request.Files["file"]获取到文件,其中"file"就是上面的input控件的名字
public class BusinessController : Controller
{}
}
}
项目地址
http://download.csdn.net/detail/findsafety/8946753