从sql 2005检索图像并在图像控件asp.net中显示 [英] retrive an image from sql 2005 and show in an image control asp.net

查看:60
本文介绍了从sql 2005检索图像并在图像控件asp.net中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如何检索以图像数据类型存储在sql 2005中的图像并显示在asp.net 2.0网页图像控件中.

请为我提供链接或示例.

在此先感谢.

Hi All,

How to retrive an image that store in sql 2005 in image datatype and show in asp.net 2.0 webpage image control.

Please guide me a Link or Example.

Thanks in Advance.

推荐答案

为此,您必须使用BLOB读取-写入.

您可以看到 [
For this, you have to use BLOB read - write.

You can see this[^] it has complete information.


这已在网络上广泛记录.如果图像在SQL Server中,则需要创建一个页面,该页面在查询字符串上使用数据库主键(id).然后,该页面获取该ID,并使用它检索图像,并设置标题并对图像数据进行Response.BinaryWrite.然后,您的图像控件指向具有正确ID的URL,以加载图像.如果您想获得更详细的说明,请尝试使用Google谷歌搜索,因为文章总是比论坛回复更清晰.

此处 [
This is widely documented on the web. If the image is in SQL Server, you need to create a page that takes a DB primary key ( an id ) on the query string. Then that page takes that id, and uses it to retrieve the image, and set the headers and do a Response.BinaryWrite of the image data. Then your image controls point to that URL with the correct ID to load the image. If you want a more detailed explanation, try googling for it, as an article is always clearer than a forum reply.

Here[^] is just one article I found, with google.


您好,

http://aspalliance.com/140_Retrieving_Images_from_SqlServer_in_ASP_NET [ ^ ]


尝试上方链接,否则您可以在Google ..许多链接中进行搜索.

谢谢
Sanjeev
Hello,

http://aspalliance.com/140_Retrieving_Images_from_SqlServer_in_ASP_NET[^]


Try Above link or you can google.. lots of links there.

Thanks
Sanjeev


这篇关于从sql 2005检索图像并在图像控件asp.net中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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