別のコントローラーのアクションからコントローラーのビューを呼び出してレンダリングするにはどうすればよいですか。私はこれを持っています、製品コントローラーのアクション:
public ActionResult SortedLists(List<string> items, string ShopID)
{
//Do sth...
db.SaveChanges();
return RedirectToAction("Index", "ControlPanel", new { ID = ShopID });
}
Index は ControlPanel Controller のアクション (ビュー) です。
public ActionResult Index(int ID)
{
ViewBag.theRelatedShopID = ID;
return View();
}
Indexをレンダリングしてブラウザに表示するにはどうすればよいですか???