62,046
社区成员
发帖
与我相关
我的任务
分享
SqlConnection conn = new SqlConnection(".........");
SqlCommand comm = new SqlCommand("select image字段 from 表 where id=1", conn);
conn.Open();
SqlDataReader reader = comm.ExecuteReader();
if (reader.Read())
{
Response.ContentType = "image/jpeg";
Response.BinaryWrite((Byte[])reader["image字段"]);
}
Response.End();
conn.Close();