如果你对什么是面包屑感到好奇:
What are breadcrumbs? Well,if you have ever browsed an online store or read posts in a forum,you have likely encountered breadcrumbs. They provide an easy way to see where you are on a site. Sites like Craigslist use breadcrumbs to describe the user’s location. Above the listings on each page is something that looks like this:
s.f. bayarea craigslist > city of san francisco > bicycles
编辑
我意识到SiteMapProvider有什么可能。我也知道在网络上的提供者,将让你映射sitenode到控制器和操作。
但是,当你想要一个breadcrumb的文本匹配一些动态值,如下:
Home > Products > Cars > Toyota
Home > Products > Cars > Chevy
Home > Products > Execution Equipment > Electric Chair
Home > Products > Execution Equipment > Gallows
…其中产品类别和产品是来自数据库的记录。一些链接应该静态定义(主页肯定)。
我试图找出如何做到这一点,但我相信有人已经这样做与ASP.net MVC。
解决方法
编辑:
有一种方法来从数据库中驱动SiteMapProvider:http://www.asp.net/Learn/data-access/tutorial-62-cs.aspx