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

    Help On sitemap path link

    I am not getting link for the nodes in sitemap.the code is as follows

    <div style="padding: 2px 2px 2px 16px; background-color: #FFFFFF;">
    <asp:SiteMapPath ID="SiteMapPath1" runat="server" PathSeparator=" >> "
    Font-Names="Verdana" Font-Size="0.8em" AccessKey="m" RenderCurrentNodeAsLink="True">
    <PathSeparatorStyle Font-Bold="true" ForeColor="#990000" />
    <CurrentNodeStyle ForeColor="#333333" />
    <NodeStyle Font-Bold="true" ForeColor="DarkSlateGray" />
    <RootNodeStyle Font-Bold="true" ForeColor="DarkSlateGray" />

    what should i add to get link for the nodes.It's very urgent
  • #653513
    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.