How to redirect to Index from another controller?

后端 未结 7 1608
滥情空心
滥情空心 2020-12-02 11:06

I have been looking through trying to find some way to redirect to an Index view from another controller.

public ActionResult Index()
{                  


        
7条回答
  •  旧时难觅i
    2020-12-02 11:22

    You can use the following code:

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

    See RedirectToAction

提交回复
热议问题