I am generating a relative path from 1 directory to another. If the OutputDirectoryName property is a directory containing spaces, the spaces are encoded using %20, rather t
Try looking at Server.UrlDecode: http://msdn.microsoft.com/en-us/library/6196h3wt.aspx
The space character is not the only one that is encoded.
string sRelativeFilePath = Uri.UnescapeDataString(new Uri(sAbsolutePath + "\\", false).MakeRelative(new Uri(filename)));
Use HttpServerUtility.UrlDecode Method (String)
You can use
Uri.UnescapeDataString
http://msdn.microsoft.com/en-us/library/system.uri.unescapedatastring.aspx