Reputation: 11
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
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