RedirectToAction between areas?

后端 未结 2 1575
我寻月下人不归
我寻月下人不归 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 = "" });
    
    0 讨论(0)
  • 2020-12-04 09:46

    Did you try this?:

    return RedirectToAction("action", "controller", new { area = "area" });
    
    0 讨论(0)
提交回复
热议问题