开发者

ASP.NET MVC SiteMap provider -Razor

开发者 https://www.devze.com 2023-03-04 19:47 出处:网络
I have downloaded the MVC SiteMap Provider from codeplexand Registered the same. In my views I am using Razor(.cshtml) to display.

I have downloaded the MVC SiteMap Provider from codeplex and Registered the same. In my views I am using Razor(.cshtml) to display.

I have a menu with all buttons in my Views folder. How do I use the MVC sitemap to display few bu开发者_JAVA技巧ttons in the Views and hide the others based on the roles .

I could not find any examples on How to configure the hiding and showing?

steps would be more helpful, what to do where?

Thanks!


Title, description and roles are retrieved from the xml node and used to create the site map node. The Roles attribute enables the security trimming feature, which hides all nodes that are not accessible to the user based on his or her roles.

More info @ http://www.webpirates.nl/webpirates/robin-van-der-knaap/29-aspnet-mvc-site-map

0

精彩评论

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

关注公众号