I have an odd problem and my eyeballs can't seem to see the error. I am using a SqlSiteMapProvider, which I plucked from an MSDN article, and I hooked my SiteMapDataSource to that provider. Oddly though, when I set it to the home page ~/Default.aspx it says it can not find it. When I set it to any other page it works fine.
Code:
<asp:TreeView runat="server" ID="trVw"
DataSourceId="SiteMapDataSource1"
OnDataBound="trVw_DataBind"
CssClass="subMenuArea"
ShowExpandCollapse="false"
NodeIndent="25"
LeafNodeStyle-VerticalPadding="4"
ParentNodeStyle-VerticalPadding="4"
SelectedNodeStyle-VerticalPadding="4"
RootNodeStyle-VerticalPadding="4"
SelectedNodeStyle-Font-Bold="true"
MaxDataBindDepth="10"
ExpandDepth="1"
PopulateNodesFromClient="false"
EnableClientScript="false"
EnableViewState="false"
NodeWrap="true" />
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
StartFromCurrentNode="false"
ShowStartingNode="true"
StartingNodeUrl="~/Careers/Default.aspx"
SiteMapProvider="SqlSiteMapProvider" />
The SqlSiteMapProvider brings back all of the rows in the SiteMap table via a stored procedure called GetSiteMap. The SiteMapDataSource is the object does the work of filtering which nodes to bind to the treeview, but for some dang reason it just won't find that root node.
Neil Timmerman
Programmer
Veris Consulting