如何获取包含局部视图的主视图?

时间:2014-05-05 04:45:35

标签: view partial

表单提交后我得到部分视图(它不包含主视图)。如何获取包含局部视图的主视图?

视图:

@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);
}

0 个答案:

没有答案