I'm trying to use HtmlTextWriter to create a html page which is all working fine until I try to create images into a folder that contains spaces in its file path
C:\Documents and Settings....
What seems to be happening is
m_htmlWriter.AddAttribute(HtmlTextWriterAttribute.Src, imageName);
is converting spaces into %20 which as a result, the file path for the source becomes invalid and results in my webbrowser and installed internet browsers not being able to display said images, and instead displaying the broken image icon/image..
I've tried multiple different things to get this to work including
Uri.UnescapeDataString
, including an @
symbol infront of the imageName
I've also found that if i copy the link from the page source (C:\Documents%20and%20Settings\...
then windows is unable to find the file(expected this)
I'm unable to use HtmlAgilityPack due to restrictions I am under.. Anyone have any ideas?