Handcoding web.sitemap

I decided to check out the System.Web.UI.WebControls.SiteMapPath for a project I’m working on. Sometimes I’ll research the tools in my toolkit and other times I’ll just pick up the tool and see what I can do with it – in this case I chose the latter approach. This is going to require some reading on my part.I ran the project without hooking the control to a data source just to see what sort of error I’d get back – If I ever get the same error I’ll know what I did wrong. It tells me The file web.sitemap required by XmlSiteMapProvider does not exist. OK, I need a web.sitemap file. Go to add a new file, sure enough, there’s a web.sitemap file there. But it has nested XML nodes that looks like this:
< siteMapNode url="" title="" description="">

So I need to provide the URL? Seems to me that there should be some way to reference pages in the project. Now I need to know if these are relative (I’m assuming) or absolute. I understand the navigation could easily point to somewhere else, but it doesn’t look like there is any GUI interface or property table to select data for these attributes.

Leave a Reply