Putting (&) ampersand sign in a SiteMapNode

Have you tried adding an ampersand (&) in an ASP.NET SiteMapNode?

For eg: The following will not work


<siteMapNode url="~/Something.aspx?CatID=54" title="ASP.NET 2.0 & 3.5" description="" />




To add an ampersand sign in the sitemapnode, use either & amp;(without space) or & #38;(without space) as shown below:


<siteMapNode url="~/Something.aspx?ID=54" title="ASP.NET 2.0 &amp; 3.5" description="" />







About The Author

Suprotim Agarwal
Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for DevCurry, DotNetCurry and SQLServerCurry. He is the Chief Editor of a Developer Magazine called DNC Magazine. He has also authored two Books - 51 Recipes using jQuery with ASP.NET Controls. and The Absolutely Awesome jQuery CookBook.

Follow him on twitter @suprotimagarwal.

1 comment:

vidhya said...

thanks so much u saved my day