I have a TextBox where I can send data to some RichTextBox. When I type something like file:///FilePath1/FilePath2/FileName3.txt
, send to RichTextBox and click on the link (LinkClicked Event) it works and I can open the file but if some FilePath has spaces (for exemple file:///File Path1/FilePath 2/FileName3.txt
) it doesn't works.
I tryed
string myString = myString.FileName;
myString = myString.Replace(" ", "%20"); // '%20' not accepted because it
// changes the FileName
and
Uri myLink = new Uri(myString );
but it's still not working. Any sugestion?