Problem Escaping Spaces in URL in Web.sitemap

M

Mike McIntyre

In a Web.sitemap file I need to include URLs that include spaces. I use %20
to escape the spaces:

<siteMapNode title="Useful Strings" description=""

url="http://getdotnetco.web119.discounta...rticles/A Few Useful String Class Methods.htm">

</siteMapNode>


Even so, I get this error when I include the URLs with the escaped spaces.

Server Error in '/CampaignNavigationControl' Application.

--------------------------------------------------------------------------------

The 'url' property had a malformed URL:
http://getdotnetco.web119.discounta...rticles/A Few Useful String Class Methods.htm.

If I remove all the %20 escapes, I don't get the error - but of course the
URLs no longer work.

Any suggestions?
 
S

Steve C. Orr [MCSD, MVP, CSM, ASP Insider]

It is invalid to have spaces in a URL. IE can be forgiving of this error,
but still it should be avoided.
 
M

Mike McIntyre

Thanks Steve.

I know its invalid. But my customer, a fortune 100 company, has spaces in
its URLs and I need to use them in a site map for a intranet site I am
building.

Any workarounds to get the ASP.NET 2.0 site map to accepth them?

--
Mike

Mike McIntyre [MVP]
http://www.getdotnetcode.com
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top