I am developing my first website and opened it in Goggle Chrome. It did not display the SiteMapPath.
Here is the code from Web.sitemap.
Code:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="~/" title="Home" description="Home" >
<siteMapNode url="~/Default.aspx" title="Home" description="Go to the homepage" />
<siteMapNode url="~/Units/Default.aspx" title="Units" description="Pictures of Premise" >
<siteMapNode url="~/Units/RiverFront.aspx" title="RiverFront" description="Down by the river" />
</siteMapNode>
<siteMapNode url="~/Fishing/Default.aspx" title="Fishing" description="Sockeye Capital of the World" >
<siteMapNode url="~/Fishing/Freshwater.aspx" title="Freshwater" description="Silvers and Pinks" />
<siteMapNode url="~/Fishing/Saltwater.aspx" title="Saltwater" description="Halibut, Rock Fish, and Ling Cod" />
</siteMapNode>
] <siteMapNode url="~/About/Default.aspx" title="About" description="About this Site" >
<siteMapNode url="~/About/Contact.aspx" title="Contact Us" description="Contact Us" />
<siteMapNode url="~/About/AboutU.aspx" title="About Us" description="About Us" />
</siteMapNode>
</siteMapNode>
</siteMap>
Here is part of the master page code for the navigation code and the SiteMapPath Control.
Code:
<nav>
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" DataSourceID="SiteMapDataSource1" Orientation="Horizontal"
StaticEnableDefaultPopOutImage="False" BackColor="Black" ForeColor="White" Width="824px">
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</nav>
<section id="MainContent">
<asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath><br />
<asp:ContentPlaceHolder ID="cpMainContent" runat="server">
</asp:ContentPlaceHolder>
</section>
Here is the HTML page source code for the SiteMapPath control.
Code:
<section id="MainContent">
<span id="SiteMapPath1"><a href="#SiteMapPath1_SkipLink" style="position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden;">Skip Navigation Links</a><a id="SiteMapPath1_SkipLink"></a></span><br />
I do not know why the SiteMapPath is not displayed.