title: C# webbrowser navite to local file. Spaces in path
body: <p>I'm using webbrowser control in C# application to display different local files, not necessarily web pages but also images and pdf.files.</p>
  
  <p>I noticed that it works:</p>
  
  <pre><code>string path = "C:\MyDirectory\file.png";   
  webBrowser1.Navigate(path,false); 
  </code></pre>
  
  <p>but if there are spaces in directories names it fails:    </p>
  
  <pre><code>string path = "C:\My Directory\file.png";   
  webBrowser1.Navigate(path,false);     
  </code></pre>
  
  <p>What is the trick to display such files correctly in webbrowser control?</p>