Linish Antony
Linish Antony

Reputation: 11

how can i display images using grid

How to display images in a grid in asp.net .These images are stored in a folder in project directory(Images).I want to show these images in grid and show images description from database .Description should show just under the image.please help

Upvotes: 1

Views: 130

Answers (1)

Adrian Iftode
Adrian Iftode

Reputation: 15683

Use a template field.

<asp:TemplateField HeaderText="Image">           
            <ItemTemplate>
                <img src='<%# "/images/" + Eval("FileName") %>' width="" height="" />
                <br />
                <p>Eval("Description")</p>
            </ItemTemplate>
</asp:TemplateField>

Upvotes: 2

Related Questions