如果你对什么是面包屑感到好奇:
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
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。