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:
string fileName = "Myfile.pdf";
Response.ContentType = "application/pdf";
Response.AddHeader("Content-Disposition", "inline; filename="+fileName);
But again, this only allows me to download the file and not view it in the browser.
Any suggestions on how I can do this?