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

1

2

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?

Stale answered 31/3, 2014 at 12:44 Comment(2)
Does SideMenu derive from Controller or does it implement IController?Greisen
Controller. But I also tried Icontroller. That creates some errors in SideMenuController. I also tried with BaseNopController. It didn't help too.Stale
G
4

I think it's

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

instead of

@Html.Action("SideMenu","Index",new { area = "" })
Greisen answered 31/3, 2014 at 13:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.