Here's my code for my Facebook share link:
<a href="<%= HttpUtility.UrlPathEncode("http://www.facebook.com/sharer.php?u=http://www.apoads.com"+ Request.Url.PathAndQuery) %>" title="Share on Facebook" rel="nofollow" target="_blank"><img src="/Content/Img/Png/SocialIcons/facebook_16.png" width="16" height="16" alt="share on facebook" /></a>
the resulting url looks like this (copy and paste from view code within Firefox):
<a href="http://www.facebook.com/sharer.php?u=http://www.apoads.com/en/Yokota/Biz/Show/Acrylic%20Nails%20for%20less" title="Share on Facebook" rel="nofollow" target="_blank"><img src="/Content/Img/Png/SocialIcons/facebook_16.png" width="16" height="16" alt="share on facebook" /></a>
Notice how the spaces in "Acrylic%20Nails%20for%20less" are represented by %20.
Yet, it appears Facebook totally strips out the %20, but also strips out the space all together! Since the name, with spaces, is how it is looked up in the database... my Facebook share link always reports a broken link.
Any way to make it keep the spaces?
Update I removed my code, added the AddThis code instead. The links generated by their service are encoded like this:
http%3A%2F%2Fwww.apoads.com%2Fen%2FYokota%2FBiz%2FShow%2FAcrylic%2520Nails%2520for%2520less
Is there a .net/c# utility to encode like this? or will I have to roll my own?