Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

ASP.Net, Visual Studio Web Application Template(isolating menu items)

I was wondering if there is an easy way inside of Visual Studio 2010 to isolate menu items so that each user Role sees only the menu items that I need them to see after they've logged in? For those menu items to be hidden to anonymous users?
0
J C
Asked:
J C
  • 3
  • 2
1 Solution
 
Paul JacksonSoftware EngineerCommented:
0
 
J CAuthor Commented:
I appreciate the link but I don't see any information on how to control which menu items users see.
0
 
Paul JacksonSoftware EngineerCommented:
Part 3 talks about how to alter what menus are shown based on users role membership

http://www.4guysfromrolla.com/articles/122805-1.aspx
0
 
Paul JacksonSoftware EngineerCommented:
0
 
J CAuthor Commented:
The first method seems like it would be simpler, not necessarily the most effecient way. What would the difference be if I am using the menu that comes built into the web application template versus the defining of a sitemap?

What changes would I make below before adding this to web.config if I am applying this to my existing menu?

<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/Default.aspx" title="Home">
     <siteMapNode url="~/About.aspx" title="About" />
     <siteMapNode url="~/Admin/Default.aspx" title="Admins" />
     <siteMapNode url="~/Tester/Default.aspx" title="Tester" />
     <siteMapNode url="~/AuthUsers/Default.aspx" title="Auth Users Only" />

     <!-- For links to outside resources, need to explicitly define what
          roles should be shown this section -->
     <siteMapNode url="http://www.scottonwriting.net/sowBlog/" title="My Blog"
                  roles="*" />
  </siteMapNode>
</siteMap>

 

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now