从DB(sql server)显示图像 [英] Display image from DB (sql server)

查看:82
本文介绍了从DB(sql server)显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想显示存储在数据库中的图像。

我该怎么做?

Hello,
i want to display images whitch stocked in data base.
How can i do that ?

推荐答案

通常我会回答大部分问题或多或少的细节,所以我很抱歉在这种情况下,我不会这样做。原因是:这个问题很方便,而且CodeProject对它有很多答案,一次又一次地回答。请看这里:

http://www.codeproject.com/search.aspx?doctypeid=4%3b5&q=database+%28image+OR+picture%29+%28store+或者+获取+ OR +检索%29 [ ^ ]。



那个已经有超过一千个结果,很多答案都很详细。



祝你好运,

-SA
Usually I answer most of questions in more or less fine detail, so I''m sorry that I don''t do it in this case. The reason is: this question is way, way too popular, and CodeProject keeps many answers to it, answered again and again. Please, just look here:
http://www.codeproject.com/search.aspx?doctypeid=4%3b5&q=database+%28image+OR+picture%29+%28store+OR+get+OR+retrieve%29[^].

That''s over thousand results, and many answers are detailed enough.

Good luck,
—SA


由于它是一个网站,您需要编写一个HTTP处理程序来处理包含标识您图像的ID的URL。然后,您查找图像并返回图像的字节,以便您可以在img标记中使用该URL。关于如何做到这一点的文章很多。
As it''s a web site, you need to write a HTTP handler that handles a URL which contains an id that identifies your image. Then you look up the image and return the bytes of the image so that you can use that url in an img tag. There''s tons of articles on how to do that.


这篇关于从DB(sql server)显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆