Link to home
Create AccountLog in
Avatar of steva
steva

asked on

Using TreeView with a Site Map

I have a simple Web.sitemap file that Im trying to build a TreeView site map around:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="~/Default.aspx" title="Home">
         <siteMapNode url="~/CreateLogin.aspx"  title="Create an Account" />
         <siteMapNode url="~/Login.aspx"  title="Login" />
    </siteMapNode>
</siteMap>

Ive dragged a SiteMapDataSource control to the page and then a TreeVeiw control.   But as soon as I link the TreeView control to the SiteMapDataSource the TreeView control shows:

"Error parsing control: A relative URI cannot be created because the uriString parameter represents an absolute URI."

I dont see any absolute URIs in what Ive written so this doesnt make sense to me. Does anyone know what might be going on?

Thanks
Avatar of G0ggy
G0ggy
Flag of United Kingdom of Great Britain and Northern Ireland image

Do you have a full web URL somewhere in your site map?
Avatar of steva
steva

ASKER

I'm not surewhat you mean.  Isn't the "site map" just web.sitemap?  As the Web.sitemap file above shows,  the three nodes there are all releative.  In any case, I checked all the pages in the project and none contain a "www" or an "http:" anywhere in the code, except for things like "siteMap xmlns="http..."  or

 !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">.

So I think the answer is no, I don't have a full web URL anywhere in my site map.
ASKER CERTIFIED SOLUTION
Avatar of steva
steva

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer