Sitemap is not visible when nodes are created at runtime

This post has 5 replies

Not Ranked
Posts: 12
innazz Posted: Fri Aug 4, 2006 @ 1:39 PM
I am facing the same problem as this<http://www.componentart.com/forums/ShowPost.aspx?PostID=20254>

I am creating Breadcrumb nodes in code behind but the Breadcrumb does not show on the page at all.

Here is the code that I am using to add a node.

Dim siteNode As New ComponentArt.Web.UI.SiteMapNode
siteNode.ID = "1"
siteNode.Visible = True
siteNode.Text = "Home"
siteNode.NavigateUrl = "mainlevel.aspx"
SiteMap1.Nodes.Add(siteNode)

Please advise how to make the Sitemap visible.
Not Ranked
Posts: 4
shyamarjarapu Posted: Fri Aug 11, 2006 @ 12:51 PM
Yeah same issue here. I am using sitemap control for breadcrumbs purpose and my hierarchy is as follows

Clients.aspx
Client.aspx?Client={CLIENT}
Surverys.aspx?Client={CLIENT}&Survey={SURVEY}
PageQuestions.aspx?Client={CLIENT}&Survey={SURVEY}&Page={PAGE}
Question.aspx?Client={CLIENT}&Survey={SURVEY}&Page={PAGE}&Question={QUESTION}

I have same set of pages with differnt Querystring parameters. So, I dynamically create xml document and supply it as a data source. It works as expected all these pages but only for couple of querystring parameters. For example: on Client.aspx page the breadcrumbs appear for Client.aspx?Client=CompanyA but not for Client.aspx?Client=CompanyB

So wierd. Please post the solution if we have any fix for it. Thank you

Regards,
Shyam Arjarapu
Top 500 Contributor
Posts: 29
cypher4g Posted: Wed Dec 6, 2006 @ 4:38 PM
I too have the same problem with this as I am loading my breadcrumb dynamically by creating the siteMap xml structure and calling LoadXml but no breadcrumb appears.
Not Ranked
Posts: 17
ljuneau Posted: Wed Feb 14, 2007 @ 2:06 PM
Same problem here. I am creating my breadcrumb in the code-behind. It contains all the nodes, however when I set the SelectedNode, it does not appear.
Top 500 Contributor
Posts: 27
vicpal25 Posted: Thu May 10, 2007 @ 11:50 AM
Put me in the list! I have tried to ask that question to support but I get this out of context response.
Top 10 Contributor
Posts: 6,149
stephen Posted: Mon Jun 4, 2007 @ 12:26 PM
Do the nodes in question have a matching url? Basically, sitemap works by comparing the current page url against the navigateurl values assigned. Let's say you have a sitemap node like:

<item Text="our company" ID="company" NavigateUrl="default.aspx">
<item Text="home page" ID="home" NavigateUrl="home.aspx" />
</item>


And your user visited home.aspx, the home and company nodes would be visible. Now, if you went to products.aspx, absolutely nothing will show- you don't have any matches. In other words, your urls must match the page your user is on.
Stephen Hatcher, Developer Support Manager
Page 1 of 1 (6 items)