-1

I have this action method on ProjectAuthorityController:

[Authorize]
[HttpGet]
public ActionResult BoqReview(Guid projectId)
{
    var model = GetReviewModel(projectId);
    return PartialView("_BoqReviewPartial", model);
}

Then in my main view, BoqUpload, I have the following Razor element:

@Html.Action("BoqReview", "ProjectAuthority", new { projectId = Model.ProjectId })

When my BoqUpload view renders a second time, after the BoqUpload POST action completes, I get the following error on the @Html.Action element:

A public action method 'BoqReview' was not found on controller 'ITIS.Web.Modules.ProjectAuthority.Controllers.ProjectAuthorityController'.

Now how can this view find the public method 'BoqReview' the first time the view renders, and not the second time?

ProfK
  • 49,207
  • 121
  • 399
  • 775

1 Answers1

0

Try to remove the [HttpGet] annotation

[Authorize]
public ActionResult BoqReview(Guid projectId)
{
    var model = GetReviewModel(projectId);
    return PartialView("_BoqReviewPartial", model);
}