try { Button Button1 = (Button)sender; string strFilename = ((Button)sender).CommandArgument; string strURL = Server.MapPath(@"" + "~/Utils/ApplicantFiles/" + strjobID + "/" + strFilename); WebClient req = new WebClient(); HttpResponse response = HttpContext.Current.Response; response.Clear(); response.ClearContent(); response.ClearHeaders(); response.Buffer = true; response.AddHeader("Content-Disposition", "attachment;filename=\"" + strURL + "\""); byte[] data = req.DownloadData(Server.MapPath(strURL)); response.BinaryWrite(data); response.End(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)