我有ActionResult上传多个文件
[HttpPost]
public ActionResult Upload(object obj)
{
// Loading all files
var result = new UploadResultProcess(fileUploads);
UploadCache.CleanAdd(UploadCache.UploadResult, result);
return RedirectToAction("Details", new { @loadAll =true});
}
ActionResult
详细信息具有可选参数
public ActionResult Details(bool loadAll=false)
{
// Load from cache
var result = (UploadResultProcess)UploadCache.Get(UploadCache.UploadResult);
result.Process(Uow, loadAll);
return View(result);
}
根据loadAll
参数,函数result.Process
将仅处理特定文件。
在点击刷新的Details
视图中,loadAll仍然是真的,为什么会这样?如果单击刷新,如何将值重置为false