我的控制器:獲取從HttpPostedFileBase值MVC
[HttpPost]
public ActionResult ShowExcelFile(HttpPostedFileBase getFile)
{
//Make something with values of getFile
return PartialView("ShowExcelFile");
}
筆者認爲:
@using (Html.BeginForm("ShowExcelFile", "ShowExcel", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input type="file" id="getFile" name="getFile" /><br />
<input type="submit" value="Upload file" />
}
我怎樣才能讀取的GetFile值是多少?
請看[Excel Data Reader](https://exceldatareader.codeplex.com/)。 – dom