site map not working

Posted by Ankitsrist under ASP.NET AJAX on 12/12/2012 | Points: 10 | Views : 1447 | Status : [Member] | Replies : 6
hello
actualy i am try to make site map menu navigation...
my aspx page is as follows...but i am getting this error at menu control and tree view control..." error parsing control a relative URI cannot be created because the uristring parametre represents a absolute URI "....please help me
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<br />
<br />
<br />
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" DataSourceID ="SiteMapDataSource1">
<StaticItemTemplate>
<%# Eval("Text") %>

</StaticItemTemplate>
<DataBindings>
<asp:MenuItemBinding DataMember="SiteMapNode" NavigateUrlField="Url" TextField="Title"
ToolTipField="Description"/>
</DataBindings>
</asp:Menu>
&nbsp;&nbsp;&nbsp;&nbsp;
<br />
<br />
<br />
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1">
</asp:TreeView>
<br />
<br />
<br />
<asp:SiteMapPath ID="SiteMapPath1" runat="server">
</asp:SiteMapPath>
<br />
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" />
<br />
<br />
<br />
<br />
<br />
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
<br />
<br />
<br />
</div>
</form>
</body>
</html>





Responses

Posted by: Ranjeet_8 on: 12/12/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
@Ankitsrist
can u plz share your site map ?

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankitsrist on: 12/12/2012 [Member] Starter | Points: 25

Up
0
Down
hello @Ranjeet_8 sir this is my sitemap...thanks

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="">
<siteMapNode url="menu1.aspx" title="menu1" description="shows menus" />
<siteMapNode url="menu2.aspx" title="menu2" description="" />
<siteMapNode url="menu3.aspx" title="menu3" description="" />
<siteMapNode url="menu4.aspx" title="menu4" description="" />
<siteMapNode url="menu5.aspx" title="menu5" description="" />
<siteMapNode url="menu4sub1.aspx" title="menu4sub1" description="" />
<siteMapNode url="menu4sub2.aspx" title="menu4sub2" description="" />
<siteMapNode url="menu5sub1.aspx" title="menu5sub1" description="" />
<siteMapNode url="menu5sub2.aspx" title="menu5sub2" description="" />
</siteMapNode>
</siteMap>


Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/12/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
look at this url i think it will help u
http://forums.asp.net/t/1225309.aspx

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ankitsrist on: 12/12/2012 [Member] Starter | Points: 25

Up
0
Down
ranjeet sir now not showing the error but when i run my app. it displays nothing on the browser

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/12/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
download sample code.
http://www.codeproject.com/Articles/15158/Using-Menu-and-Sitemap-with-Master-page

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/13/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
@Ankitsrist
Please Mark As Answer if post helps you.

Ankitsrist, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response