C# asp.net5 make a link to download PDF file : I make a link that download the PDF file When click on the Link.
 
Here is my .cshtml:
<html>
<body>

    <h1>Hello Shuainan</h1>
    <a href="/Account/PdfDownload">download</a>


    <input type="button" value="Download" onClick="download('test.pdf')" />

    <script>
        function download(file) {
            window.location = file;
        }
    </script>

</body>

</html>

and the download function is :



public void PdfDownload(string path, string fileName)
{

            var myPDF = System.IO.File.ReadAllBytes(@"C:\Program Files\wkhtmltopdf\bin\myPDF.pdf");

            Response.ContentType = "Application/pdf";

            Response.Headers.Add("Content-Disposition", "attachment; filename=testPDF.pdf");
            Response.Body.Write(myPDF, 0, 2048);
}

And the I cant LOAD the PDF file when finish the download ,
PLS help me with that.
Ty for advance.