dataTable に追加する sql image フィールドがあります。次に、この画像を Json 呼び出しに渡します。画像を取得しようとするときのjson呼び出しで、次
image_returnset[0].Picture
の値が保持されますSystem.Byte[]
。
System.Byte[]
を反復して、画像を html 画像コントロールにバインドするにはどうすればよいですか?
これは私のC#コードです
userSqlParameter.Direction = ParameterDirection.Input;
userSqlParameter.Value = itemID;
SqlCommand cmd = new SqlCommand("Get_image", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(userSqlParameter);
da.SelectCommand = cmd;
//byte[] barrImg = (byte[])dt.Rows[0]["Picture"];
// dt.Rows[0]["Picture"]
da.Fill(dt);