0

Using a <asp:SiteMapPath> control with the Web.sitemap file below:

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<asp:SiteMapPath ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
<asp:Image ID="Image1" runat="server" ImageUrl="~/closed-sign.jpg" Height="300" Width="400" />

While running it's not showing me way it should show as in this example.

It's only showing the image, with no sitemap.

How can this be fixed?

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home"  description="Home Page">
<siteMapNode url="StandardToolBox.aspx" title="Standard ToolBox Control"  description="Standard ToolBox Control">
  <siteMapNode url="BulletedList.aspx" title="BulltedList Example"  description="BulltedList Control Simple Example" />
  <siteMapNode url="CheckBox.aspx" title="CheckBox Example"  description="CheckBox Control Simple Example" />
  <siteMapNode url="CheckBoxList.aspx" title="CheckBoxList Example"  description="CheckBoxList Control Simple Example" />
  <siteMapNode url="Image.aspx" title="Image Control Example" description="Image Control Simple Example"/>
</siteMapNode>
<siteMapNode url="DataToolBox.aspx" title="Data ToolBox Control"  description="Data ToolBox Control">
  <siteMapNode url="SqlDataSource.aspx" title="SqlDataSource Example"  description="SqlDataSource Simple Example" />
  <siteMapNode url="XmlDataSource.aspx" title="XmlDataSource Example"  description="XmlDataSource Simple Example" />
</siteMapNode>

p.campbell
  • 98,673
  • 67
  • 256
  • 322
deepti
  • 729
  • 4
  • 17
  • 38
  • Which page are you visiting where you expect this sitemap to be shown? – p.campbell Sep 21 '11 at 22:58
  • there is other page i created same as shown in example...http://asp-net-example.blogspot.com/2008/10/sitemappath-example-how-to-use.html it showing home->standardtoolbar->Image control example. i need it show same way in my page.. it only showing image – deepti Sep 21 '11 at 23:07

1 Answers1

2

The code you're using works fine.

Likely the page you're looking at is NOT anywhere in the list on the site map.

Ensure you're running this sample on a page named like:

  • StandardToolBox.aspx
  • CheckBox.aspx
  • DataToolBox.aspx

This is a breadcrumb control. It will only show links back to its parents. It will not send links to siblings.

p.campbell
  • 98,673
  • 67
  • 256
  • 322
  • i changed page to corresponsing page..as well as subsequent pages too. it only showing home.. and not showing me subsequent links if standardtoolboxcontrol – deepti Sep 21 '11 at 23:10