System.Net.WebClient wb = new System.Net.WebClient();
//檔案路徑
string link = "http://localhost:56303/TempWebsite/Areas/DownloadPDF/Test.pdf";
Response.ClearHeaders();
Response.Clear();
Response.Expires = 0;
Response.Buffer = true;
Response.AddHeader("Accept-Language", "zh-tw");
Response.AddHeader("Content-Disposition", "Attachment;FileName=" + System.Web.HttpUtility.UrlEncode("測試PDF.pdf", System.Text.Encoding.UTF8));
Response.ContentType = "Application/pdf";
Response.BinaryWrite(wb.DownloadData(link));
Response.End();