protected void btnview_Click(object sender, EventArgs e) { try { sample_rep(); string FilePath = Server.MapPath("~") + "\\Customer_Pdf\\MWFTS_Quotation_" + quotationid.Text + ".pdf"; System.IO.FileInfo TargetFile = new System.IO.FileInfo(FilePath); if (TargetFile.Exists) { Response.Clear(); Response.AddHeader("Content-Disposition", "attachment; filename=" + TargetFile.Name); Response.AddHeader("Content-Length", TargetFile.Length.ToString()); Response.ContentType = "application/octet-stream"; Response.WriteFile(TargetFile.FullName); } } catch (Exception exp) { WebFormMaster.WriteToErrorLog("", exp); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)