public void download2(string fpath) { // string fileName = "detailed_syllabus.pdf"; Response.ClearContent(); FileInfo updateFile = new FileInfo(fpath); Response.ContentType = "application/octet-stream"; Response.AddHeader("content-disposition", "attachment;filename=\"" + Path.GetFileName(updateFile.FullName) + "\""); Response.AddHeader("content-length", updateFile.Length.ToString()); Response.TransmitFile(updateFile.FullName); Response.Flush(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)