Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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.
Posted
Updated 4-Jul-11 19:57pm
v2

For this, you have to use BLOB read - write.

You can see this[^] it has complete information.
 
Share this answer
 
v2
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.
 
Share this answer
 
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
 
Share this answer
 
Hope this[^] also might help you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900