From: Amir Tohidi on
Hi

I have the following simple SiteMapDataSource and TreeView control on my
site's master page. The TreeView works fine on the default (home) page and
the pages immesdiately below it. However, as soon as I naviagte to one of the
lower level pages (eg. Accounts/CurrentAccount.aspx), the TreeView disappears.

Can anyone please tell me what I am doing wrong?

=====
SiteMap
=====
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="Default.aspx" title="Home page" description="Home page">
<siteMapNode url="Accounts/AccountsDefault.aspx" title="Accounts"
description="Accounts home page">
<siteMapNode url="Accounts/CurrentAccount.aspx" title="Current
Accounts" description="Current Accounts functionality" />
<siteMapNode url="Reports/CurrentAccount.aspx" title="Current Account
Report" description="Reports functionality" />
</siteMapNode>
</siteMapNode>
</siteMap>


========
Master page
========
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs"
Inherits="Admin.Site" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Admin site</title>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form id="form1" runat="server">
<h1>Admin</h1>
<div>
<span class="breadcrumb">
<asp:SiteMapPath ID="SiteMapPath1"
runat="server"></asp:SiteMapPath>
</span>
</div>
<div id="navigation">
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" ExpandDepth="0" ShowLines="True" />
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
ShowStartingNode="False" StartFromCurrentNode="True" />
</div>
<div>
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>