Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old October 31st, 2006, 04:22 PM
Friend of Wrox
 
Join Date: Feb 2006
Location: , , USA.
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default SiteMapDataSource won't find my root node...

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically cha nging root node!!!!!!! rakesh XSLT 4 July 29th, 2008 09:31 AM
How to find a node which is between two instances rajatake XSLT 3 December 22nd, 2006 07:31 AM
root node should not be expanded at page load Hannibal ASP.NET 2.0 Basics 0 November 28th, 2006 10:52 AM
Replacing New Root Node fauster XSLT 4 October 6th, 2006 11:17 AM
Copying Source Node attributes to output node pvsat XSLT 2 November 3rd, 2005 09:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.