读书人

图片无法显示.解决方案

发布时间: 2012-01-07 21:41:55 作者: rapoo

图片无法显示.
pdl = pdp.GetModel(_pid);
byte[] picStream = (byte[])pdl.Picture;

if (_cla == "A ")
{
Response.ContentType = "image/pjpeg ";
Response.BinaryWrite(picStream);
}

竟然无法显示图片,什么原因呢? 是以二进制存到数据库里的,为何从1.1转到2.0就出错了, 请各位帮帮忙,这倒底是什么原因呢.

看了很多网上的,都是这样写,但我的就是无法显示.

[解决办法]
Response.ContentType = "image/pjpeg ";
Response.ContentType = "image/p.jpeg ";

读书人网 >asp.net

热点推荐