protected void btnway2_Click(object sender, EventArgs e) { string path = MapPath("1.pdf"); System.Net.WebClient client = new System.Net.WebClient(); Byte[] buffer = client.DownloadData(path); if (buffer != null) { Response.ContentType = "application/pdf"; Response.AddHeader("content-length", buffer.Length.ToString()); Response.BinaryWrite(buffer); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)