Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Web.Mvc.HtmlHelper does not contain a definition for MvcSiteMap

I am using MvcSiteMapProvider MVC5 with my web application and inside of my _Layout.cshtml file I am using:

@if (Html.MvcSiteMap().SiteMap.CurrentNode != Html.MvcSiteMap().SiteMap.RootNode)
    {
        @Html.MvcSiteMap().SiteMapPath()
    }

But the Intellisence is throwing this error:

System.Web.Mvc.HtmlHelper does not contain a definition for MvcSiteMap

Does anyone know how to fix this problem?

like image 328
user667430 Avatar asked Mar 26 '14 14:03

user667430


1 Answers

@using MvcSiteMapProvider.Web.Html

Fixed by adding this to the top of the view as said by

@StevenV

like image 154
user667430 Avatar answered Sep 18 '22 17:09

user667430