我在控制器中执行了以下操作:
[HttpPost]
public ActionResult Index(Config entity)
{
if (MainFacadeSpv.SpvCoreService.Update(entity))
{
return View(MainFacadeSpv.SpvCoreService.GetConfig());
}
return ViewBag(entity);
}
但是我需要执行一个toastr参数化,类似的东西:
[HttpPost]
public ActionResult Index(Config entity)
{
if (MainFacadeSpv.SpvCoreService.Update(entity))
{
**return View(MainFacadeSpv.SpvCoreService.GetConfig(), "toastr["success"]("Data saved")");**
}
**return ViewBag(entity, "toastr["error"]("Data not saved")");**
}
如何在控制器的动作上执行此toastr或任何jquery o javascript函数?
谢谢!!!