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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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?