表单提交后我得到部分视图(它不包含主视图)。如何获取包含局部视图的主视图?
视图:
@using (Ajax.BeginForm("Index", "Home", new AjaxOptions { HttpMethod = "POST", UpdateTargetId = "result", OnBegin = "onBegin()", OnComplete = "onComplate()" }))
{
<div id="result"></div>
...
控制器:
public ActionResult Index()
{
return View(model);
}
[HttpPost]
public PartialViewResult Index(mdl model)
{
...
return PartialView("_part", model);
}