SqlConnection conn = new SqlConnection();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter();
byte[] arrContent ;
DataRow dr;
string strSql;
strSql = "Select Image from productItems where productid = 18";
da = new SqlDataAdapter(strSql, connectionString);
da.Fill(ds);
dr = ds.Tables[0].Rows[0];
arrContent = (byte[])dr["Image"];
Response.OutputStream.Write(arrContent,0,6306);
Response.End();
I am unable to write the bytes data on my page which is actually an image. what I see is a series of special characters. what am i doing wrong?