{ SqlConnection con = new SqlConnection(); SqlCommand cmd = new SqlCommand(); private SqlDbType sq; protected void Page_Load(object sender, EventArgs e) { if ("progimg "== "cmd") { string filename = " progimg".ToString(); if (filename != "") { string path = MapPath(filename); byte[] bts = System.IO.File.ReadAllBytes(path); Response.Clear(); Response.ClearHeaders(); Response.AddHeader("Content-Type", "Application/octet-stream"); Response.AddHeader("Content-Length", bts.Length.ToString()); Response.AddHeader("Content-Disposition", "attachment; filename=" + filename); Response.BinaryWrite(bts); Response.Flush(); Response.End(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)