Click here to Skip to main content
15,909,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,
I am working with an asp.net project.I want to display images and its names in grid.Images are located in the application directory folder 'Images'.And also i want to display image descriptions under each images.These descriptions are stored in the database.Please help.
Posted
Comments
Mohamed Mitwalli 20-May-12 11:13am    
What you did so Far ??

 
Share this answer
 
Comments
Wendelius 20-May-12 11:42am    
Good links!
Maciej Los 20-May-12 13:10pm    
Thank you, Mika ;)
Prasad_Kulkarni 21-May-12 1:19am    
My 5!
Maciej Los 21-May-12 1:29am    
Thank you ;)
VJ Reddy 21-May-12 8:44am    
Good references. 5!
Set http://www.website.com/Upload/Image/ with your actual location of image.
C#
<asp:templatefield headertext="Image" headerstyle-width="25%" itemstyle-height="60px" xmlns:asp="#unknown">
                                                ItemStyle-Width="400px" ItemStyle-HorizontalAlign="left" HeaderStyle-HorizontalAlign="left">
                                                <itemtemplate>
                                                    ">
                                                        id="Img" alt="" />
                                                </itemtemplate>
                                            </asp:templatefield>
 
Share this answer
 
first you should clearify how u bind you grid from which : database or image directory:

if you want to bind it with database
then add templat field and add image control with this:

HTML
<img src="<%# Eval("ImgPath") %>" />
 
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