I used the following code which is working for a PDF in chrome browser
@Html.ActionLink("Download", "GetReport", new { controller = "Storage" }, new { target = "_blank" })
Here is my code inside controller
public FileResult GetReport()
{
string ReportURL = @"C:\Tools\HazMat\HazMat\Uploads\IAC HILL TOP CAMPING LIST OF FREE ADVENTURE ACTIVITIES..pdf";
byte[] FileBytes = System.IO.File.ReadAllBytes(ReportURL);
return File(FileBytes, "application/pdf");
}
When I gave a path related to docx
file here it is downloading instead of opening the document so how can I open any kind of file in to a new tab