How to simulate Server.Transfer in ASP.NET MVC?

后端 未结 14 1565
死守一世寂寞
死守一世寂寞 2020-11-22 12:00

In ASP.NET MVC you can return a redirect ActionResult quite easily :

 return RedirectToAction(\"Index\");

 or

 return RedirectToRoute(new { controller = \"         


        
14条回答
  •  醉梦人生
    2020-11-22 12:37

    Doesn't routing just take care of this scenario for you? i.e. for the scenario described above, you could just create a route handler that implemented this logic.

提交回复
热议问题