using (SqlDataReader rdr = DAL.executeQuery(sql, _params)) { if (rdr.Read()) { Byte[] buffer = (Byte[])rdr["file_stream"]; Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment; filename=" + rdr["FileNameInClient"].ToString()); Response.AddHeader("Content-Type", "application/octet-stream"); Response.AddHeader("Content-Length", buffer.Length.ToString()); Response.(buffer); Response.Flush(); Response.End(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)