Using MvcSiteMapProvider, you can easily implement site maps, commonly known as "breadcrumb ".
Use NuGet, enter MvcSiteMapProvider to search for and install the SDK.
Configure the following in Mvc. sitemap:
<?xml version="1.0" encoding="utf-8" ?><mvcSiteMap xmlns="http://mvcsitemap.codeplex.com/schemas/MvcSiteMap-File-3.0" enableLocalization="true"> <mvcSiteMapNode title="Home" controller="Home" action="Index"> <mvcSiteMapNode title="News" controller="News" action="Index" key="News"> <mvcSiteMapNode title="Sports News" controller="News" action="Sports"/> </mvcSiteMapNode> <mvcSiteMapNode title="About" controller="About" action="Index"/> </mvcSiteMapNode></mvcSiteMap>
Create HomeController, Index method, and view.
Create NewsController, Index, Sports, and view.
Create the AboutController, About method, and view.
In Views/Shared/_ Layout. cshtml:
<!DOCTYPE html>