You must Sign In to post a response.
  • Category: ASP.NET

    Help On Site map Control with roles

    I need more than one sitemap to be placed in a website ,based on roles.How to access them in pages
  • #653517
    follow below steps
    1. create web.sitemap file
    2. add your code like
    <?xml version="1.0" encoding="utf-8" ?>
    <siteMap enableLocalization="true" xmlns="" >
    <siteMapNode title="Home">
    <siteMapNode title="$Resources:WebResources, lblDashboard">
    <siteMapNode url="~/Dashboard/Reporting.aspx" title="$Resources:WebResources, lblReportingDashboard" />
    <siteMapNode url="~/Dashboard/CognosReporting.aspx" title="$Resources:WebResources, lblCognosReportingDashboard" />
    <siteMapNode url="~/Dashboard/Disputes.aspx" title="$Resources:WebResources, lblDisputesDashboard" />
    <siteMapNode url="~/Giftcards/GiftCardDashboard.aspx" title="$Resources:WebResources, lblGIFTCARDS" />
    <siteMapNode url="~/Dashboard/TodaysData.aspx" title="Today's Data" />

    3. add below code where you want to access the nodes
    if (SiteMap.RootNode.HasChildNodes)
    foreach (SiteMapNode childNodesEnumerator in SiteMap.RootNode.ChildNodes)

    former code will help you.. if you find any problem let me know

  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.