T4MVC @Url.Action(MVC.Controller.Action()) Renders “?Area=” Parameter in QueryString

后端 未结 2 1705
眼角桃花
眼角桃花 2020-12-14 08:20

I am rendering a menu from a Partial Action directly to the layout, using:

@Html.Action(MVC.Menu.Index())

This action, determines which Men

2条回答
  •  星月不相逢
    2020-12-14 08:50

    I solve this issue in a very easy way, simply by adding to all routes that are not in area empty area route like this:

    routes.MapRoute(
    "Default",
    "{controller}/{action}/{i​d}",
    new { controller = "Home", action = "Index", area = "", id = UrlParameter.Optional });
    

提交回复
热议问题