62,046
社区成员
发帖
与我相关
我的任务
分享
string s = "";
byte[] image = (byte[])dt.Rows[0][0];
//取出BLOB类型的BASE64编码转换成STRING
s = System.Text.Encoding.GetEncoding(0).GetString(image);
//把STRING类型的BASE64转换成BYTEs[]
byte[] image1 = Convert.FromBase64String(s);
//最后输出
Response.ClearContent();
Response.ContentType = ".jpg";
Response.BinaryWrite(image1);
Response.End();