一、直接Redirect後加 Controller/Action
Response.Redirect("/User/Edit");
// return Redirect("/User/Edit");
return RedirectToAction("about","Home"); html
Response.Redirect("/User/Edit"); app
二、直接return後加 Controller/Action url
return Redirect("/User/Edit"); spa
三、RedirectToAction方法,直接跳到一個action htm
return RedirectToAction("edit"); it
四、跳轉的頁並不在該Controller中 io
return RedirectToAction("about","Home"); test
5. redirect跳轉
String url = "redirect:/test.do"; request
mav = new ModelAndView(url); 方法