Details: Error parsing near '%PDF-1.2 %?? 1 0 ob'
string ViewFileName = Server.MapPath(DocumentPath + lblHiddenFileName.Text); FileInfo infofile = new FileInfo(ViewFileName); string myFile = ViewFileName; WebClient myWeb = new WebClient(); Byte[] myBuff = myWeb.DownloadData(myFile); Response.Expires = 0; Response.CacheControl = "no-cache"; Response.AppendHeader("Pragma", "no-cache"); Response.Buffer = true; Response.ContentType = contenttype;//"application/pdf"; Response.AddHeader("Content-Disposition", "attachment; filename=" + infofile.Name); Response.BinaryWrite(myBuff);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)