Reputation: 119
I want to implement navigation menu in ASP.Net MVC4 in Razor view. It will show user how he/she has traversed the pages and will be able to go back to any previous pages in hierarchy.
Eg. If user is browsing products, and if he has reached 'Mobile phones' browsing, I would like navigation menu to display something like below:
Home » All Products » Mobiles & Tablets » Mobile phones
Please note in above navigation, 'Mobile phones' will be only label, whereas other navigation items will be link. User can click on this link and go back to any previous page.
Please suggest approach to implement this.
Upvotes: 0
Views: 1210
Reputation: 13569
What you are looking for is called breadcrumbs if you are looking for already implemented solutions or how it was done please take a look at those projects.
MVC Sitemap Provider tutorial 2 – Breadcrumbs
Creating Dynamic Breadcrumbs in ASP.NET MVC With MvcSiteMap
Upvotes: 1