【发布时间】:2015-06-25 22:06:31
【问题描述】:
我无法从控制器显示异常消息以供查看。
控制器:
[HttpPost]
public ActionResult BlankTemplate(string startyear, string endyear, string templatetype,DownloadTemplateViewModel dm)
{
try
{
// Do Something
}
catch(Exception ex)
{
ModelState.AddModelError(string.Empty, ex.Message);
return View(dm);
}
Return View()
}
查看:
<table>
Validation.summary(false)
</table>
有什么帮助吗?
我使用的是相同的视图。
并且异常与HttpPost同时发生。
【问题讨论】:
标签: asp.net-mvc exception view controller