Solved

Using TreeView with a Site Map

Posted on 2008-06-09
3
664 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
Comment Utility
Do you have a full web URL somewhere in your site map?
0
 

Author Comment

by:steva
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

AJAX ModalPopupExtender has a required property "TargetControlID" which may seem to be very confusing to new users. It means the server control that will be extended by the ModalPopup, for instance, if when you click a button, a ModalPopup displays,…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now