How to correctly use Html.ActionLink with ASP.NET MVC 4 Areas

后端 未结 4 933
野的像风
野的像风 2021-02-01 01:30

I recently discovered Areas in ASP.NET MVC 4, which I have successfully implemented, but I\'m running into troubles with the @Html.ActionLink helper in my Razor vie

4条回答
  •  春和景丽
    2021-02-01 02:24

    How I redirect to an area is add it as a parameter

    @Html.Action("Action", "Controller", new { area = "AreaName" })
    

    for the href portion of a link I use

    @Url.Action("Action", "Controller", new { area = "AreaName" })
    

提交回复
热议问题