views:

149

answers:

1

In relation to this post I'm using the MvcSiteMap provider. I can't seem to get it to work. What I'm doing is opening the project made available by the download, compiling it, then taking the MvcSiteMap.Core.dll generated by the build, placing it in my Dependencies folder in my MVC project, and then right-clicking on references and hitting "Add Reference". From here I'm just trying to use it in my masterpage but intellisense isn't picking it up, and trying to build with it isn't working either.

I'm trying to do <%=Html.SiteMapPath()%> without any luck. Any ideas?

A: 

Have you add <add namespace="name of the mvcsitemap package"> to yours web.config (under following xpath: /configuration/system.web/pages/namespace)?

Here is an example from the project home page: http://mvcsitemap.codeplex.com/

<pages>
    <controls>
     <! -- ... -->
    </controls>
    <namespaces>
 <! -- ... -->
 <add namespace="MvcSiteMap.Core.Helpers"/>
    </namespaces>
 </pages>
Piotr Czapla
Bingo. I had actually sorted it out a while ago, but this is correct (and the only answer!). Thanks :)
Kezzer