I have created a table in SQL and stored some fields image. When I want to retrieve the data and image, it's not working. I have stored the image by converting it into byte array. Will you please help me on how to retrieve the data and image into ASP webpage?
Asked
Active
Viewed 143 times
-2
-
2search on google thousands of article there for this – rahularyansharma Oct 20 '11 at 05:05
-
http://mitch-wheat.blogspot.com/2007/05/save-and-restore-filesimages-to-sql.html – Mitch Wheat Oct 20 '11 at 05:08
-
what code you use to convert the images to byte Array – Vir Oct 20 '11 at 05:08
1 Answers
1
Steps:
- Read the byte array from blob (image) field and create a MemoryStream
- Save that byte array or Write it to Response buffer.

Community
- 1
- 1

KV Prajapati
- 93,659
- 19
- 148
- 186
-
1There is no reason to decode the bytes into an image just so save it again. Just serve the bytes. – Guffa Oct 20 '11 at 05:28
-