0
我有一個調用這個動作來構建CompareEvents頁面的表單:調用RedirectToAction
[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
我該如何實現?
是在同一個控制器定義這兩個操作? – Kenneth