【发布时间】:2013-01-15 15:19:59
【问题描述】:
我在视图(父视图)中使用局部视图
我在部分视图中有一个表单,当我点击部分视图的提交按钮时,我想调用部分视图的 [HttpPost] 方法......但它没有被调用,它只调用父级的 [HttpPost]查看...
[HttpPost]
public ActionResult ParentView(Model model)
{
return View();
}
[HttpPost]
public ActionResult PartialView(Model model)
{
return View();
}
【问题讨论】:
-
检查表单操作是否设置为正确的操作/控制器。听起来它正在指向当前的父操作。
-
您可能想要编辑问题的标题。目前,它的描述性不是很好。
标签: c# .net asp.net-mvc-3 web-applications partial-views