开发者

Is it possible to hide from some users some menu's elements while using ASP.NET menu control?

Let's say I have a menu that contains everything. But, I want some elements not to be visible to every user.

Thanks开发者_运维知识库 for helping


You can bind the menu items to a site map and use the roles attribute. You will need to enable Security Trimming in your Web.Config to do this.

You can find a nice tutorial at http://weblogs.asp.net/jgalloway/archive/2008/01/26/asp-net-menu-and-sitemap-security-trimming-plus-a-trick-for-when-your-menu-and-security-don-t-match-up.aspx

For more information, please check: Can I hide/show asp:Menu items based on role?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜