ActionLink to Another Area in MVC projects (C#)

Use of Html.ActionLink in MVC projects is trivial. Unless you need to call action from another area.
In this cases you need to specify 'Area' as a method parameter, but at the same time don't forget to put empty object at the end.
Html.ActionLink("Link Text", "ActionName", "ControllerName", new { Area = "AreaName" }, new{})

No comments:

Post a Comment