Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
please answer my Question.
I want to save pic or image to db and read pic or image from db and show to gridview.
Please answer.
Posted
Updated 5-Apr-11 6:49am
v2
Comments
Sandeep Mewara 5-Apr-11 12:49pm    
No need to bold your question.

Start from here:C# Photo Album Viewer[^]

If you get stuck, post your effort with details and issue faced.
 
Share this answer
 
There are several article targeting this issue, even here in CP. This one was the first hit when I searched: Uploading / Downloading Pictures to / from a SQL Server[^]
 
Share this answer
 
In addition to Sandeep and Mika solution you can also go there[^] to learn how to get or set image in database.
 
Share this answer
 
What you need to do in a nut shell, is serialise the image to a blob type in SQL and then deserialise it when you retrieve it from your database and want to display the image on your gridview.

It gets more complicated if it is an ASP gridview as then you need to save the images before you display as you can't set the source of an image to an image from memory.
 
Share this answer
 
v2

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