Sitemap control - Treeview control

How do i define which webpages can be rolled up or appear under other pages in the treeview navigation?

My web.sitemap code:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="" >
    <siteMapNode url="Default.aspx" title="Home"  description="">

        <siteMapNode url="tbe_JobManagerHome.aspx" title="Job Manager"  description="" />
        <siteMapNode url="tbe_Project.aspx" title="Project Page"  description="" />
    <siteMapNode url="Admin.aspx" title="Home"  description="">

        <siteMapNode url="page2.aspx" title="page2Title"  description="" />
        <siteMapNode url="page3.aspx" title="page3Title"  description="" />

My folder structure:


They are all on the same level in the project but shouldnt i be able to say which ones i want grouped with the other?  Do i need to set a property somewhere?  Thanks!  Right now i get an error which says i have an invalid child element in my sitemap namespace.

1/30/2006 11:55:45 PM 13714 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 10

Surely someone knows what the deal is with this?  Could really use the help!  No one has been able to resolve this on any board i have posted to.
1/31/2006 11:02:01 PM

The web.sitemap file requires that exactly ONE sitemapnode element appear under the SiteMap element.  That is why you are getting that error.  What you should do is create a dummy top level node:

<siteMapNode url="~/" title="">
  <!--- put the body of your SiteMap you have above here -->


Then in your SiteMapDataSource, set: showStartingNode="false'"

This should do what you need.  Let me know if this helps.

disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
2/1/2006 4:18:00 AM

Ok, i will try that...  for some reason, this seems to work as well without setting the showStartingNode = "false".  I just copied a sample from somewhere and have changed it to be my sites files etc...  Why is this working and mine wasnt?

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="" >

<siteMapNode url="~/Default.aspx" title="Home">

<siteMapNode url="~/tbe_JobManagerHome.aspx" title="Job Manager">

<siteMapNode url="~/tbe_Project.aspx" title="Projects" />

<siteMapNode url="~/tbe_BiddersCheckList.aspx" title="Bidders CheckList" />

<siteMapNode url="~/tbe_AsphaltWorksheet.aspx" title="Asphalt Worksheet" />


<siteMapNode url="~/tbe_Application Administration.aspx" title="Application Admin" >

<siteMapNode url="~/tbe_CrewBuilder.aspx" title="Crew Builder" />

<siteMapNode url="~/tbe_EndCodes.aspx" title="End Codes" />




Using your trick with the showStarting node set to false, this code seems to work as well:

<?xml version="1.0" encoding="utf-8" ?>

<siteMap xmlns="" >

<siteMapNode url="~/" title="">

<siteMapNode url="Default.aspx" title="Home" description="">

<siteMapNode url="tbe_JobManagerHome.aspx" title="Job Manager" description="" />

<siteMapNode url="tbe_Project.aspx" title="Project Page" description="" />


<siteMapNode url="Admin.aspx" title="Admin" description="">

<siteMapNode url="page2.aspx" title="page2Title" description="" />

<siteMapNode url="page3.aspx" title="page3Title" description="" />




Do you now why the code above is working without the showstarting node=false as you had suggested?  Thanks again for replying!

2/1/2006 7:00:53 PM

Similar Artilces:

Custom Control within a Control Control
I am developing a custom controls that will render headers for different web sites. Within these controls, I want to place another custom control that will change the language. I created the language control and had it implement IPostBackDataHandler. This control works fine if I drag it on a new web form, but if I tell a header custom control to render it problems occur. The Language Selector custom control does not have a Page member anymore and the event handlers do not work. Does anyone have any experience with doing something similiar? Anyone have any suggestions? Thanks, ...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this? Information Technolo...

How do you control the placement of controls in a user define control
I have a user define control.  I put the control on the (C# Visual Studio 2008) page where I want them. When I run the program, the controls are all over the page.  How do I place them where they do not move form where I put them? You'll need to study the HTML output and see what it's producing, then start to look at how to do an HTML layout. hi, there are absolute and Relative position in html. I guess you must use relative position. For example, at design-time, you place a TextBox below an Image, at run-time, no matter what size is the image, the TextBox is alway bel...

Trying to load a control into a control from another control
Exactly as the subject states, I'm trying to load a control into another control from a control loaded into a page, I keep getting this error from the code I have below. I've also tried the findcontrol but it keeps coming up null. (67): 'System.Web.UI.UserControl' denotes a 'class' where a 'variable' was expected UserControl ut = ((webcontrols.BrowseItems)UserControl).LoadControl("BrowseItems"); ((webcontrols.BrowseItems)UserControl).pnl_browse_main.Controls.Add(ut); This is how we Load User controls into a content place holder. try { UserCont...

How to access page control (editor control) from user control?
Hi, I want to do something, but I don't know if it's even possible. I'm trying to make a simple application to edit my website. I have a page called editPage.aspx which contains an editor control. (cuteEditor from cutesoft) I also have a Treeview that dynamically populates my website structure. I placed this treeview in a custom control (populateTreeView.ascx) and placed it on the editPage.aspx page. When you click on a html file in the treeview (inside the custom control) I check if the file exists. If it does exists I send it to a class which retrieves the editable region within this ...

Controls.Add in Composite Control that inherits another control
Hi! I created a composite control that inherits from the WebControls.Button. I added the following in the Load event:         Dim mHidden As New WebControls.HiddenField        Me.Controls.Add(mHidden) but the control is not created. Why?Dimitris PapadimitriouSoftware Development Professional Hi,Child controls on Button do not make much sense (how would you expect them to be rendered, doesn't button allow only text into value attribute?). Button allows child controls to be added, but they won't be rendered b...

The menu control is out of my control
Here's my situation, I've been searching for about 2 weeks to try to do this without any luck. My limited knowledge of ASP doesn't help but I should have found an answer by now because it seems so simple. So here it is. I'm using the menu control and the CSS Friendly Control Adapters 2.0 to make it a bit easier to apply CSS to. ShowStartingNode is set to false because I want to see the whole menu. I have the menu just how I want it. Now, I want to be able to hide certain nodes in the menu. Not so users cant access them (some people have suggested using access control but this...

controlling user controls
I'm starting an app. I'm using a usercontrol for a template. In my "template" I have a usercontrol that at times displays a login form. In this usercontrol is a link to the register page. Currently, my register page works by just calling my register user control in the main content area of the template. I'd like to cut out the register.aspx so that the link simply tells the other area on my page to display the register.ascx. So that I don't have several pages... just one default.aspx. How do I do this? I'm thinking the template.ascx will have a placeholder in the main...

Control Gallery Control
Would the ASP.NET team care to give us a big gift... the Control Gallery Control? It would be perfect for one of my current projects, and I figure, why reinvent the wheel when this one works well ;-). I did a little browsing, and some recent posts show that I'm not alone with the need for this control ;-) powered by #Portal - Your source for all PC news!...

Control in control problems
************* Edited by moderator Adec *************** Inserted missing < code></ code> tags. Always include such tags when including code in your postings. Many readers disregard postings without the code tags. ************************************************** Here is the senario I am presented with. I will follow it with the code. Webform 1 contains User Control 1. Now, this control contains User Control 2. I have Webform 1 call a subroutine 1 in User Control 1. This sub routine, calls a subroutine 2 in User control 2. Unfortunately, VS2003 will not allow Use...

How do you control the menu control?
I am using the ASP 2.0 menu control.  When my submenus display, they display on top of the text that is already there from the content page.  The result is an unreadable mixture of text from both the page and the submenu.  Is there a way to force the submenu text to be on top of the content page's text without showing the content page text?  I don't see a property that can do this.  Thanks. The pop out panels should not be transparent and they should appear on top of the content page (unless the z-index of your controls are greater than 1). Please could you pr...

Visibility control of Panel control and its affect on data controls
Thought I would toss this out here this morning and perhaps someone else had run across the same issue and had found a good way to accomplish what I want. First let me state what I'm attempting to do and the problem that I've run into.  GridView1 has a collection of rows in a SQL table that I want to present to the user. I've provided them the options of sorting and selecting only from the GridView control.  Orgionally, I had created a detail view that was being presented in Edit mode and then customized the layout of the edit item template to suit my needs.&nbs...

Getting the control id of a control inside gridview control
 uhmm.. a little bit confusing regarding my subject because i dont know how to say the way my problem is how can i get the id of a control (e.g. textbox) inside the gridview... and the textbox is in the templatefield... is there any way i can get its id??  hoping i could get a reply as soon as possible... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) What do you want's to do by getting the id of the Text box? Do you want's to find particular Textbox with certain id ? Kamran ShahidSr. Software Engineer(MCP,,MC...

Control In Control Problem
Hi, guys.I've written two web controls for reservation system.One is a Datepicker which alows user to pick a date (pretty obvious ) and another one is a Reservation which alows user to pick a location (hotel) and number of rooms and number of people in each room.Both of them inherit WebControl and implement ICallbackEventHandler and INamingContainerI bind to them list with available days... List of hotels and regions (if it's to be used for reservation in hotels chain) well... whatever...Both of them work great while I don't try to include the DatePicker in the Reservation... Her...

Passing Controls to Controls
I have built a very simple DropDown control similar to what Microsoft uses on their website, and the one listed in the control gallery. This control exposes 2 properties, Title and Text. The code looks something like this: <script> Public PassedTitle as String Public PassedText as String .... .... MyText.Text=PassedText </script> .... .... <asp:Literal id="MyText" /> I also have another control that scans the DB at my workplace and pulls up the last 10 articles that have been posted to the knowledgebase and lists their titles and h...

Web resources about - Sitemap control - Treeview control -

Live-Beta TreeView Demo: Frameless Layout with Highlighting TreeView Demo: Frameless Layout with Highlighting ...
Welcome to our beta site for CBC Live mp3 streams! This is a form of online broadcast we are exploring right now, both from a technical best-practices ...

Visual Basic for Applications - Wikipedia, the free encyclopedia
Visual Basic for Applications ( VBA ) is an implementation of Microsoft 's event-driven programming language Visual Basic 6 and its associated ...

From the Saint
It's full steam ahead for events in the Saint today; although some have been postponed, others are getting bigger and better.

HOME - St. Catharines
St. Catharines is a city that offers many ammenities and opportunities to its residents. It is a place known for its friendliness, charm and ...

CrossFont Help
CrossFont Help

Examples - AlloyUI
AlloyUI is a framework built on top of YUI3 that provides a simple API for building high scalable applications. — all software.
Xara X1 1.1 DL Xara X is an advanced graphic illustration package for Windows, that offers unrivaled redraw speed and a user interface which ...

CrossFont Help
CrossFont Help

Evolution of the Windows Interface
... a 3D button, comboboxes. Windows 95 introduced a slew of new 3D controls, such as rich text edit, toolbars/statusbar, progressbar, treeview/listview, ...

Silverlight - Blackboard
Silverlight is a development platform for creating rich media applications and business applications for the Web, desktop, and mobile devices.Microsoft ...

Resources last updated: 11/27/2015 12:00:25 PM