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

StackOverflow https://stackoverflow.com/questions/22761883

質問

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?

役に立ちましたか?

解決

I think it's

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

instead of

@Html.Action("SideMenu","Index",new { area = "" })
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top