string conn = ConfigurationManager.AppSettings["ConnectionString"].ToString();
SqlConnection Connection = new SqlConnection(conn);
Connection.Open();
String SqlCmd = "select * from LocationImage where LIIntNo='"+imageid+"' ";
SqlCommand CmdObj = new SqlCommand(SqlCmd, Connection);
SqlDataReader SqlReader = CmdObj.ExecuteReader();
SqlReader.Read();
Response.ContentType = "image/jpeg";
Response.OutputStream.Write((byte[])SqlReader["LocImage"], 0, ((byte[])SqlReader["LocImage"]).Length);
Response.End();
Connection.Close();