public class DownLoad { public static void FileDownLoad(string URL) { WebClient Request = new WebClient(); HttpResponse Response = HttpContext.Current.Response; Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.Buffer = true; Response.AddHeader("Content-Disposition", "attachment;filename=\"" +URL +"\""); byte[] data = Request.DownloadData(URL); 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)