The controller for path '/' was not found or does not implement IController. in nopCommerce

大兔子大兔子 提交于 2020-01-04 06:50:12

问题


I am trying to call an action in HeaderLinks.cshtml razor view.

@Html.Action("SideMenu","Index")

SideMenuController is in a plugin that i installed on nopCommerce. All routing is good.

routes.MapRoute("Nop.Plugin.Other.SideMenu.Log", "sidemenu/index", new { controller = "SideMenu", action = "Index" }, new[] { "Nop.Plugin.Other.SideMenu.Controllers" });

But the view is showing an error - "The controller for path '/' was not found or does not implement IController."

I also tried with that...

@Html.Action("SideMenu","Index",new { area = "" })

Result is same. What is causing that and how can i get rid of it?


回答1:


I think it's

@Html.Action("Index","SideMenu",new { area = "" })

instead of

@Html.Action("SideMenu","Index",new { area = "" })


来源:https://stackoverflow.com/questions/22761883/the-controller-for-path-was-not-found-or-does-not-implement-icontroller-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!