Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:27 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.