treeview renders nothing, but does look good in design view? web.siteMap

Discussion in 'ASP .Net' started by jobs, Oct 29, 2007.

  1. jobs

    jobs Guest

    I have this web.sitemap file in web root.

    I have a simple page with a treeview control in another directory:

    <%@ Page Language="VB" AutoEventWireup="false" MasterPageFile="~/Main/
    MasterPage.master"
    Title="Americatel Retailer Website SiteMap"
    CodeFile="SiteMap.aspx.vb" Inherits="_Phones" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="Content1"
    runat="Server">
    <asp:TreeView ID="TreeView1" runat="server"
    DataSourceID="SiteMapDataSource1">
    </asp:TreeView>
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
    <br />

    </asp:Content>


    In design view on vs.net, i see the tree just fine.

    but when I run, i get nothing.

    I suspect my problem my be with the top node, but everything looks
    fine:

    <siteMapNode title="Americatel Retailer Website" url="https://
    mysite.com">
    <siteMapNode url="RecoverPass.aspx" title="Recover Password" / <siteMapNode title="Help">
    <siteMapNode url="Help/FAQ_Products.aspx" title="Products FAQ" />
    <siteMapNode url="Help/FAQ_WS.aspx" title="Website FAQ" />
    </siteMapNode>
    <siteMapNode title="Main">
    <siteMapNode url="Main/Default.aspx" title="Home Page" />
    <siteMapNode url="Main/ChangePassword.aspx" title="Change
    Password" />
    </siteMapNode>

    is there some property i need to set or point it to a specific sitemap
    file? how?

    Thanks for any help or information.
     
    jobs, Oct 29, 2007
    #1
    1. Advertisements

  2. jobs

    jobs Guest

    Apparently there is something i'm not understanding.

    Must I have a url on my highest level sitemapNode?

    I played around with startingNodeUrl on the datasource, but non of the
    nodes or childs with no url show up. How can I group urls into
    directories that have a url?
     
    jobs, Oct 29, 2007
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.