我在ProjectAuthorityController
上有此操作方法:
[Authorize]
[HttpGet]
public ActionResult BoqReview(Guid projectId)
{
var model = GetReviewModel(projectId);
return PartialView("_BoqReviewPartial", model);
}
然后在我的主视图BoqUpload
中,我具有以下Razor元素:
@Html.Action("BoqReview", "ProjectAuthority", new { projectId = Model.ProjectId })
当我的BoqUpload
视图再次呈现时,在BoqUpload
POST操作完成之后,我在@Html.Action
元素上收到以下错误:
A public action method 'BoqReview' was not found on controller 'ITIS.Web.Modules.ProjectAuthority.Controllers.ProjectAuthorityController'.
现在,该视图如何在第一次渲染而不是第二次找到公共方法“ BoqReview”?
答案 0 :(得分:0)
尝试删除[HttpGet]
批注
[Authorize]
public ActionResult BoqReview(Guid projectId)
{
var model = GetReviewModel(projectId);
return PartialView("_BoqReviewPartial", model);
}