Redirect To Action Between Areas In MVC

In this article I am going to show how we can redirect between areas in MVC.

When using area, we should always specify the area in route value in the action link. If link/destination is outside from area, then we just need to use an empty parameter for the area.

I am going to show you how we can achieve this.

Html.ActionLink("Log Off", "LogOff", "Account", new { area = "" }, null)

Above we used empty parameter for area, now you should redirect to your desired page/action

Leave a Reply