现在使用webBrowser时碰到一个问题:
webBrowser1.Document.Body.InnerHtml=strSource;
其中strSource中的内容有一部分是“C:\Documents and Settings\tom\桌面\cat.jpg”,赋值给webBrowser1.Document.Body.InnerHtml后,webBrowser1将上面的内容变为“file:///C:/Documents%20and%20Settings\tom\桌面\cat.jpg”,也就是说路径格式变了,而且空格使用%20替换。如何实现webBrowser1不改变内容,获得的还是“C:\Documents
and Settings\tom\桌面\cat.jpg”。
或者告知如何写一个方法,将“file:///C:/Documents%20and%20Settings\tom\桌面\cat.jpg”转化为“C:\Documents and Settings\tom\桌面\cat.jpg”。
请高手指点,谢谢!