开发者

How to hide node with ASP.NET MVC SiteMap provider

I have such node which i want to hide when user is authenticat开发者_如何学Ced.

How can i do that with ASP.NET MVC SiteMap provider?

I tried that:

http://mvcsitemap.codeplex.com/discussions/246986

but then i am getting an error:

Value cannot be null.
Parameter name: type 
 Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

 Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: type

Source Error: 

Line 114:               @Html.MvcSiteMap("MvcSiteMapProvider").Menu()


You can make your node hidden for authenticated users by specifying roles="?" in your node:

<mvcSiteMapNode controller="HomeController" action="Index" title="Home" roles="?"/>

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜