a developer's notes – a semi-technical web development BLOG

February 26, 2014

Getting started with MvcSiteMapProvider with ASP.NET MVC

Filed under: ASP.NET MVC — Duy Nguyen @ 12:54 pm
Tags: , , , , ,

Here is a great site to get started with MvcSiteMapProvider. MvcSiteMapProvider provides a simple and easy way to add breadcrumb support to your MVC site.
http://maartenba.github.io/MvcSiteMapProvider/getting-started.html

Some tutorial links:
http://edspencer.me.uk/2011/02/10/mvc-sitemap-provider-tutorial/
http://edspencer.me.uk/2011/09/20/mvc-sitemap-provider-tutorial-2-breadcrumbs/

Note: There is a NuGet package for

    MvcSiteMapProvider MVC 4
    MvcSiteMapProvider MVC 4 Core (core library if you need to reference the library from a non MVC project such as a class library.)
    MvcSiteMapProvider MVC 5
    MvcSiteMapProvider MVC 5 Core (core library if you need to reference the library from a non MVC project such as a class library.)

Note:
If you get an error “does not contain a definition for ‘MvcSiteMap'”in the Razor view with this line…

@Html.MvcSiteMap().SiteMapPath()

Add in this using statement:

@using MvcSiteMapProvider.Web.Html;
Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: