Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have stored a few images in my SQL server table ABC.
The name of the column is "myImages" and it's datatype is Image.

How to display these images in a Gridview?
Posted
Updated 29-Aug-10 1:53am
v2

If you would had tried CodeProject search (leaving Google search aside)... you would had got these and many more:
How to upload an image using ASP.NET[^]
C# Photo Album Viewer[^]
 
Share this answer
 
Comments
Dalek Dave 29-Aug-10 14:16pm    
Yep, good answer
vaibhav286 30-Aug-10 2:18am    
Reason for my vote of 2
doesn't solve my purpose
Sandeep:I don't want to use any static control like the one given in the example mentioned by you. I am aware of this approach. I want to display image using #Eval method of gridview if it is possible.

I don't want any code on rowdatachange or any other event.Any other suggestion for binding a gridview control to [image] datatype directly?

@Abhijit:The approach you are using is used very often but what if I want to display image directly from the database and not from the physical location? Any suggestions?
 
Share this answer
 
You may have look into this also, though here I have stored image in physical drive and stored the image path in database.
Displaying Image in Gridview from Database[^]
 
Share this answer
 
Comments
vaibhav286 30-Aug-10 2:18am    
Reason for my vote of 1
different approach than what I had asked for
Abhijit Jana 1-Sep-10 13:33pm    
I had already mentioned that. "You may have look into this also"

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