Solved

Using TreeView with a Site Map

Posted on 2008-06-09
3
670 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help with building query string 2 21
"Emulate" TAB key when press Enter Key 3 45
Add a Condition in ASP Repeater 6 34
Google Maps with Webforms 1 10
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

809 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