2

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

Richard77
  • 20,343
  • 46
  • 150
  • 252

1 Answers1

2

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?

Community
  • 1
  • 1
Kamyar
  • 18,639
  • 9
  • 97
  • 171