试图从用户选择的文本文件中将文本读入内存
模型:
public HttpPostedFileBase File { get; set; }
看法
<form action="" method="post" enctype="multipart/form-data" id="MyForm">
@Html.TextBoxFor(m => m.File, new { type = "file" })
<input type="submit" name="btnSubmit" id="ProcessAll" value="Process All" />
</form>
控制器:
[HttpPost]
public ActionResult FileToFasta(F2FModel model)
{
//Need to read file to a string without uploading it
return View(model);
}
有什么想法吗?谢谢