任何人都知道一步一步执行上传任何类型的文件说文本文件并获取从中提取的内容,并在其他视图中显示该内容。如果有人可以,请让我知道所有步骤......
答案 0 :(得分:-1)
You can achieve this by following below steps
//Controller
public ActionResult GetContent(string path)
{
return new FilePathResult(path, "application/octet-stream");
}
//View
@Html.Action("GetContent","ControllerName", new { path = "~/path_of_the_file"" });