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="?"/>
精彩评论