you want to know how you can easily trigger a popup download in MVC controller rather than using a href link to open into a new window?
Below is the simple script on how you can do it.
public FileContentResult Download(long listingID) { var document = new FileInfo(Server.MapPath("~/sample.pdf")); if (document != null) { Response.AppendHeader("Content-Disposition", "FileName=sample.pdf"); return File(System.IO.File.ReadAllBytes(filepath), "application/octet-stream"); } return null; }