binding sitemappath with custom .sitemap file

D

Danial

Hi,

How can I bind sitemappath (breadcrumb control of asp.net) to a custom
..sitemap file?

By defualt its looking for web.sitemap file and giving me not found
exception.

Thanks
Danial
 
G

Guest

Danial,
You link to your custom sitemap from the standard sitemap see this link.
http://msdn2.microsoft.com/en-us/library/ms178426.aspx

To use the sitemappath you just fill in the templates. It builds a table
and what I didn't know when I built my first one is that I should have use li
elements for maximum css designer effect but we're all learning here its 2.0
stuff. You might not even need the following.

<table>
<tr>
<asp:SiteMapPath ID="SiteMapPath1" runat="server"
RenderCurrentNodeAsLink="True"
PathDirection="CurrentToRoot" PathSeparator=""
SkipLinkText="">
<CurrentNodeTemplate>
<td>
<a id="A1" title='<%# Eval("description") %>'
runat="server">
<img id="Img1" runat="server" src='<%#
eval("image") %>' height="76" /><br />
<%# Eval("title") %>
</a>
</td>
</CurrentNodeTemplate>
<NodeTemplate>
<td>
<a href='<%# eval("url") %>' title='<%#
Eval("description") %>' runat="server">
<img runat="server" src='<%# eval("image") %>'
height="47" /><br />
<%# Eval("title") %>
</a>
</td>
</NodeTemplate>
</asp:SiteMapPath>
</tr>
</table>

Good Luck
DWS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top