|
Subject:
|
Displaying Images in a DataGrid
|
|
Posted By:
|
RichardOrmiston
|
Post Date:
|
12/13/2005 7:06:44 AM
|
How do you get html <img src=""> into a datagrid? I store the image path in a database, e.g butteredpopcorn.jpg
Here is what I have so far
<asp:DataGrid id="dgOutPut" runat="server" autogeneratecolumns="false"> <columns> <asp:BoundColumn datafield="Prod_Image"/> </columns> </asp:datagrid>
|
|
Reply By:
|
RichardOrmiston
|
Reply Date:
|
12/13/2005 12:13:33 PM
|
Sorted it myself, here is how
<asp:TemplateColumn> <ItemTemplate> <img src='assets/products/<%# Container.DataItem ("Prod_Image") %>' width='100' height='100'> </ItemTemplate> </asp:TemplateColumn>
|