I have a Preview button on my page. I want to display a .doc
file in the browser when the user clicks on that button. I have written the code below, but it directly downloads the file instead of displaying it in the browser.
public FileResult ViewFile() {
Response.AddHeader("content-disposition", "inline;filename=;");
return File("~/Templates/chronoExp.doc", "application/msword");
}