public void DownLoad(string FName) { string path = FName; System.IO.FileInfo file = new System.IO.FileInfo(path); if (file.Exists) { Response.Clear(); Response.ContentType = "application/octet-stream"; Response.AppendHeader("Content-Disposition", "attachment;filename = " + file.Name + ""); Response.TransmitFile(Server.MapPath("~/Attachments/" + file.Name)); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)