protected void grdDetailView_RowCommand(object sender, GridViewCommandEventArgs e) { byte[] _downFile = FTP.DownloadFileFromFtp(e.CommandArgument.ToString()); string _fname = e.CommandArgument.ToString(); Response.ContentType = "application/" + Server.MapPath("filename.ext"); Response.ContentType = "application/" + _fname.Split('.')[1]; Response.AddHeader("Content-disposition", "attachment; filename=" + _fname); Response.OutputStream.Write(_downFile, 0, _downFile.Length); Response.End(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)