Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 20, 2012 08:57 AM by Angie xu - MSFT
Member
712 Points
1475 Posts
Dec 15, 2012 01:30 AM|LINK
Why my SiteMapPath is not working ? These are the code:-
on aspx page
<asp:SiteMapPath ID="SiteMapPath2" runat="server"> </asp:SiteMapPath>
In web.sitemap
<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title=" Home" description="Home" Url="~/default.aspx"> <siteMapNode> <siteMapNode title=" Page1" description="Page1" Url="~/Page1.aspx"></siteMapNode> <siteMapNode title=" Page2" description="Page2" Url="~/Page2.aspx"></siteMapNode> </siteMapNode>
</siteMap>
on page load
nothing is displayed.... Pls help.
Star
14471 Points
2236 Posts
Dec 15, 2012 01:35 AM|LINK
Did you setup the sitemap provider in the web.config? If not, then sitemappath has no idea what to connect to so it just won't show anything.
Dec 15, 2012 01:43 AM|LINK
This is extracted from my web.config
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true"> <providers> <add name="XmlSiteMapProvider" description="SiteMap provider which reads in .sitemap XML files." type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" siteMapFile="web.sitemap" securityTrimmingEnabled="true"/> </providers> </siteMap>
Anything went wrong ?
Thanks
All-Star
31737 Points
6481 Posts
Dec 15, 2012 01:51 AM|LINK
try this
<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode title=" Home" description="Home" Url="~/default.aspx"> <siteMapNode title=" Page1" description="Page1" Url="~/Page1.aspx"></siteMapNode> <siteMapNode title=" Page2" description="Page2" Url="~/Page2.aspx"></siteMapNode> </siteMapNode> </siteMap>
Dec 15, 2012 02:55 AM|LINK
Thanks a lot, but still nothing shows up...
551 Points
145 Posts
Dec 15, 2012 03:00 AM|LINK
see the example
http://msdn.microsoft.com/en-us/library/x20z8c51%28v=vs.100%29.aspx
18658 Points
1590 Posts
Microsoft
Dec 20, 2012 08:57 AM|LINK
Hi hkbeer
We would really need a lot more specifics about this, and then we all could give more precise judgment.
Kind regards
hkbeer
Member
712 Points
1475 Posts
Why my SiteMapPath is not working
Dec 15, 2012 01:30 AM|LINK
Why my SiteMapPath is not working ? These are the code:-
on aspx page
<asp:SiteMapPath ID="SiteMapPath2" runat="server">
</asp:SiteMapPath>
In web.sitemap
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode title=" Home" description="Home" Url="~/default.aspx">
<siteMapNode>
<siteMapNode title=" Page1" description="Page1" Url="~/Page1.aspx"></siteMapNode>
<siteMapNode title=" Page2" description="Page2" Url="~/Page2.aspx"></siteMapNode>
</siteMapNode>
</siteMap>
on page load
nothing is displayed.... Pls help.
www.developerfusion.com/tools/convert/csharp-to-vb/
markfitzme
Star
14471 Points
2236 Posts
Re: Why my SiteMapPath is not working
Dec 15, 2012 01:35 AM|LINK
Did you setup the sitemap provider in the web.config? If not, then sitemappath has no idea what to connect to so it just won't show anything.
hkbeer
Member
712 Points
1475 Posts
Re: Why my SiteMapPath is not working
Dec 15, 2012 01:43 AM|LINK
This is extracted from my web.config
<siteMap defaultProvider="XmlSiteMapProvider" enabled="true">
<providers>
<add name="XmlSiteMapProvider"
description="SiteMap provider which reads in .sitemap XML files."
type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
siteMapFile="web.sitemap"
securityTrimmingEnabled="true"/>
</providers>
</siteMap>
Anything went wrong ?
Thanks
www.developerfusion.com/tools/convert/csharp-to-vb/
oned_gk
All-Star
31737 Points
6481 Posts
Re: Why my SiteMapPath is not working
Dec 15, 2012 01:51 AM|LINK
try this
<?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode title=" Home" description="Home" Url="~/default.aspx"> <siteMapNode title=" Page1" description="Page1" Url="~/Page1.aspx"></siteMapNode> <siteMapNode title=" Page2" description="Page2" Url="~/Page2.aspx"></siteMapNode> </siteMapNode> </siteMap>hkbeer
Member
712 Points
1475 Posts
Re: Why my SiteMapPath is not working
Dec 15, 2012 02:55 AM|LINK
Thanks a lot, but still nothing shows up...
www.developerfusion.com/tools/convert/csharp-to-vb/
Shailendra S...
Member
551 Points
145 Posts
Re: Why my SiteMapPath is not working
Dec 15, 2012 03:00 AM|LINK
see the example
http://msdn.microsoft.com/en-us/library/x20z8c51%28v=vs.100%29.aspx
www.techaray.com
Angie xu - M...
All-Star
18658 Points
1590 Posts
Microsoft
Re: Why my SiteMapPath is not working
Dec 20, 2012 08:57 AM|LINK
Hi hkbeer
We would really need a lot more specifics about this, and then we all could give more precise judgment.
Kind regards
Feedback to us
Develop and promote your apps in Windows Store