Aidan Garnish
MOSS 2007 and other Microsoft technologies

Solution to the ampersand (&) gotcha in SiteMapPath breadcrumb

November 21, 2007 16:03 by aidan

If you name a site or page with an & and you want to also use the breadcrumb SiteMapPath control then you are going to see some nasty results. This is because the control outputs "&" instead of "&".

To fix this you need to make a change to the sitemappath control. Simply include SiteMapProvider="CurrentNavSiteMapProviderNoEncode" as follows:

 <asp:SiteMapPath runat="server" id="SiteMapPath1" PathSeparator="|" SiteMapProvider="CurrentNavSiteMapProviderNoEncode"></asp:SiteMapPath>


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags:
Categories: MOSS 2007
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

Related posts

Comments

November 21. 2007 17:21

For more information on other characters _not_ to use please see:
http://support.microsoft.com/kb/905231

Luis

November 21. 2007 19:36

Great post! I'll try this out to see if it solves my apostrophe issue in SiteMapPath as well. This has been bugging me for a month.

Eric Portney

November 21. 2007 22:53

Eric - this solution is specific to the SiteMapPath control so should resolve your issue

aidan

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 6. 2009 14:52