HOME ABOUT
I AM HERE
  • Twitter icon
  • Facebook icon
  • Technorati icon
Bookmark and Share

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>


Tags:
Categories: MOSS 2007
Actions: E-mail | Permalink | Comments (3) | Comment RSSRSS comment feed

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


  • Comment
  • Preview
Loading