title: How to VIEW files on asp.net?
body: <p>I am trying to view files from a folder in asp.net. I have tried using the "Response" class and its many functions to view files but so far I have been unsuccessful. Mostly using the Response class allows me to download the files but not view them in the browser. Most of what I have seen online suggests the same thing which is to use this bit of code: </p>
  
  <pre><code>string fileName = "Myfile.pdf";
  Response.ContentType = "application/pdf";
  Response.AddHeader("Content-Disposition", "inline; filename="+fileName);
  </code></pre>
  
  <p>But again, this only allows me to download the file and not view it in the browser.</p>
  
  <p>Any suggestions on how I can do this?</p>