请教一个问题:我用下面的代码显示数据库中的图片,但我如何在指定的表格单元格中显示?
string strSql="select JkPhoto from tcj where id=9";
SqlCommand cmd=new SqlCommand(strSql,MySqlConnection.getConnection());
SqlDataReader dr=cmd.ExecuteReader();
dr.Read();
Response.BinaryWrite((byte[])dr["JkPhoto"]);
Response.End();
dr.Close();
string strSql="select JkPhoto from tcj where id=9";
SqlCommand cmd=new SqlCommand(strSql,MySqlConnection.getConnection());
SqlDataReader dr=cmd.ExecuteReader();
dr.Read();
Response.BinaryWrite((byte[])dr["JkPhoto"]);
Response.End();
dr.Close();
a.htm
<table>
<tr>
<td><img src='b.aspx?id=19'/></td>
</tr>
</table>输出页
b.aspx
string strSql="select JkPhoto from tcj where id="+Request.QueryString["id"];
下面接着写你的就行了