RedirectToAction between areas?

后端 未结 2 1584
我寻月下人不归
我寻月下人不归 2020-12-04 08:48

Is there a way to redirect to a specific action/controller on a different Area?

2条回答
  •  清歌不尽
    2020-12-04 09:34

    Your answer was helpful to me. Just wanted to add below:

    If you want to redirect from one area to another area, above code works well.

    And, if you want to redirect from one area to a controller/view which is not there in the area folder (i.e. in most cases, your front end), you can specify area = "".

    i.e.

    return RedirectToAction("action", "controller", new { area = "" });
    

提交回复
热议问题