怎样把写如数据库的图片在网页 的任意位置输出
就是把图片写成二进制 image ,写进sql200中
我想在任意位置输出,可是读完之后就
<script runat="server">
sub page_load
dim conmydata as sqlconnection
dim strselect as string
dim cmdselect as sqlcommand
dim dtrsearch as sqldatareader
conmydata = new sqlconnection(dbconn)
strselect = "select document_type,document from uploads where id =11"
cmdselect = new sqlcommand(strselect,conmydata)
conmydata.open()
dtrsearch = cmdselect.executereader()
if dtrsearch.read
response.Clearheaders()
select case dtrsearch("document_type")
case "doc"
response.ContentType = "application/msword"
case "swf"
response.ContentType = "application/x-shockwave-flash"
case "gif"
response.ContentType = "image/gif"
end select
response.BinaryWrite(dtrsearch("document"))
end if
dtrsearch.close
conmydata.close
end sub
</script>