title: TransmitFile with filename containing spaces
body: <p>In C# ASP.Net Website, to transfer the file to client I am using</p>
  <pre><code>String file_path = Server.MapPath(&quot;~/files/&quot;+file_name); 
  HttpContext.Current.Response.ContentType = &quot;application/octet-stream&quot;;
  HttpContext.Current.Response.AddHeader(&quot;Content-Disposition&quot;, &quot;attachment;filename=&quot; + file_Name);
  HttpContext.Current.Response.TransmitFile(file_path);        
  HttpContext.Current.Response.End();
  </code></pre>
  <p>It is working perfectly, but when the file name contains any spaces the downloaded file has a name only up to the first word. For ex: If my file name is <code>&quot;This is demo.txt&quot;</code> then the downloaded file name becomes <code>&quot;This&quot;</code> with no extension. Hence the user downloading it is not able to identify its type.<br />
  How can we avoid happening it for file name containing spaces?</p>
  <p>I tried using</p>
  <pre><code>String file_path = &quot;'&quot;+Server.MapPath(&quot;~/files/&quot;+file_name)+&quot;'&quot;;
  </code></pre>
  <p>But it didn't work.</p>
  <p>Also its not possible for me to replace ( with '_' or '-') or remove all the spaces present in the file name which are present on the server.</p>