MVC上传文件示例

     [HttpPost]
public void SaveFile(FormCollection form)
{
var c = Request.Files.Count; var f = Request.Files[];
}
@using (Html.BeginForm("SaveFile", "Test", FormMethod.Post,  new { id = "form1", enctype = "multipart/form-data" }))
{ <input id="File2" name="File2" type="file" /> <input id="File1" name="File1" type="file" />
<input id="Submit1" type="submit" value="submit" />
}
上一篇:MVC2.0==>MVC3.0


下一篇:bzoj 1083: [SCOI2005]繁忙的都市 (最小生成树)