Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 12th, 2007, 11:30 AM
Registered User
 
Join Date: Jun 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sitemapnode and roles

Can you help me in understanding why code 1 works while code 2 not? It seems that it is possible to hide sitemapnodes depending on roles only for nodes which contains nodes inside.

Code 1)

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="Default.aspx?x=" title="Home" description="Home" >
          <siteMapNode title="A" roles="UserA">
      <siteMapNode url="~/Pages/1.aspx" title="1" />
    </siteMapNode>
    <siteMapNode title="B" roles="UserB">
    <siteMapNode url="~/Pages/2.aspx" title="2" />
    </siteMapNode>
  </siteMapNode>
</siteMap>

**************************************
Code 2)

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="Default.aspx?x=" title="Home" description="Home" >
      <siteMapNode url="~/Pages/1.aspx" title="1" roles="UserA" />
    <siteMapNode url="~/Pages/2.aspx" title="2" roles="UserB" />
  </siteMapNode>
</siteMap>





Similar Threads
Thread Thread Starter Forum Replies Last Post
Roles bhasker_braj121 SQL Server 2005 1 January 19th, 2008 12:10 PM
Chapter 6 Roles hdpark BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 7 November 16th, 2007 07:43 PM
Roles jackandjo BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 2 October 17th, 2006 03:12 AM
AutoGenerateEditButton and Roles harrison4411 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 March 28th, 2006 04:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.