문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top