<%Html.RenderAction("BrowserVersion", "HomeController"); %>
I got the error below:
The controller for path '/' was not found or does not implement IController.
Code for HomeController:
public class HomeController : Controller
{
[ChildActionOnly]
public ActionResult BrowserName()
{
ViewData["BrowserName"] = Request.Browser.Browser;
return View();
}
}
To get rid of the error the call to RenderAction should be RenderAction("BrowserName", "Home") without the Controller suffix.
1 comment:
Thank you! This was dogging me for hours.
Cheers!
Post a Comment