开发者

Setting the page's title and sitemap node to the same text with ASP.NET MVC Sitemap Provider

开发者 https://www.devze.com 2023-02-18 22:33 出处:网络
I\'m using ASP.NET MVC 3 and ASP.NET MVC Sitemap Provider.I would like to set the view\'s title and the sitemap node to the same text.How would I do this?Where would it be done and are there any sampl

I'm using ASP.NET MVC 3 and ASP.NET MVC Sitemap Provider. I would like to set the view's title and the sitemap node to the same text. How would I do this? Where would it be done and are there any samples?

So if I have the following link /Product/Create then I would like the page title to be 开发者_如何转开发Capture New Product. And the sitemap trail must look like Home > Product > Capture New Product.

How would one write tests for this in NUnit? Are tests necessary?


Set the view's title to SiteMap.CurrentNode.Title. This should do the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消