1、直接Redirect后加 Controller/Action

Response.Redirect("/User/Edit");

return Redirect("/User/Edit");  

return RedirectToAction("about","Home");

Response.Redirect("/User/Edit");     

2、直接return后加 Controller/Action

return Redirect("/User/Edit");             

3、RedirectToAction方法,直接跳到一个action

return RedirectToAction("edit");

4、跳转的页并不在该Controller中  

return RedirectToAction("about","Home"); 

5. redirect跳转

String url = "redirect:/test.do";

ModelAndView mav = new ModelAndView(url);

相关文章:

  • 2022-12-23
  • 2021-09-03
  • 2022-01-09
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
猜你喜欢
  • 2022-03-07
  • 2022-01-21
  • 2022-12-23
  • 2021-05-16
相关资源
相似解决方案