我有一个调用此操作来构建 CompareEvents 页面的表单:
[HttpPost]
public ActionResult CompareEvents(int[] EventsList, bool showIndex, bool showFRN, bool showProvider)
{
var viewModel = new EventsListViewModel
{
Events = EventsList,
ShowFRN = showFRN,
ShowIndex = showIndex,
ShowProvider = showProvider
};
return View(viewModel);
}
在 CompareEvents 视图中,还有另一个表单允许用户更新信息:
[HttpPost]
public ActionResult UpdateSolution(IEnumerable<Solution> sol)
{
//update solution code
int[] eventList = { '85' };
return RedirectToAction("CompareEvents", new { EventsList = eventList, showIndex = true, showFRN = true, showProvider = true });
}
当此信息更新时,我想重新加载页面。我计划通过再次调用 CompareEvents 操作来执行此操作,但是我的堆栈跟踪说A public action method 'CompareEvents' was not found on controller
我怎样才能做到这一点?