binding sitemappath with custom .sitemap file

  • Thread starter Thread starter Danial
  • Start date Start date
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
 
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

Back
Top