从数据库读取图片并加载到image控件中,数据库有3个和图片相关的字段。字段名 类型
img image
imgtype varchar
imgsize bigintimg 就是图片
imgtype 是ContentType
imgsize 是图片大小请问如何从数据库中取出图片并邦定到image控件中!
img image
imgtype varchar
imgsize bigintimg 就是图片
imgtype 是ContentType
imgsize 是图片大小请问如何从数据库中取出图片并邦定到image控件中!
{
string PhotoId = Request["PhotoId"];
//设置contenttype
Response.ContentType =
//从数据库读出来
string photoContent = getphotofromdatabase(PhotoId)
Response.BinaryWrite( photoContent );
}