Solved

Using TreeView with a Site Map

Posted on 2008-06-09
3
668 Views
Last Modified: 2008-06-18
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
0
Comment
Question by:steva
  • 2
3 Comments
 
LVL 11

Expert Comment

by:G0ggy
ID: 21751943
Do you have a full web URL somewhere in your site map?
0
 

Author Comment

by:steva
ID: 21752688
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.
0
 

Accepted Solution

by:
steva earned 0 total points
ID: 21753484
Ok, now it's working!  Not sure what happened.  I deleted all the site map controls and the web.sitemap file  and re-entered everything.  Maybe Visual Web Developer had gotten into some state that confused it.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question