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?
@using MvcSiteMapProvider.Web.Html
Fixed by adding this to the top of the view as said by
@StevenV
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With