string myFile = Server.MapPath("~/Files/sample.pdf"); System.Net.WebClient myWeb = new System.Net.WebClient(); Byte[] myBuff = myWeb.DownloadData(myFile); Response.ContentType = "application/pdf"; Response.AddHeader("content-length", myBuff.Length.ToString()); Response.BinaryWrite(myBuff);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)