3

I have a '.mht' file that I need to open in the browser like a View or something like that. In my controller I return a FilePathResult with the contentType. But when I type the URL the file is download as a file of unknown type.

public ActionResult Manual()
{
     return new FilePathResult("../Content/html/Manual.mhtml", "message/rfc822");
}

I tried using return File instead of return new FilePathResult but is the same result.

Thanks for the help.

1 Answers1

0

You need to use Iframe for this to work. and should keep it a mht file.

<p>
<strong>
<iframe align="middle" src="\\sharepoint.company\file.mht" width="100%" height="150%" scrolling="no"  ></iframe>
</strong>
</p>
Gilbert V
  • 1,050
  • 5
  • 16
  • 43