Hi everyone,
I have a repeater control, which display data from database. I'm using the vs express 2005 edition. I have a table Shop which consists of images as well as description of the shop. The images has data type varchar(100) in sql database.
My problem is that i cannot load the images in the datagrid. The description is displaying but not the image.
Can someone please advice me?
The repeater code:
<aspanel ID="pnlShowProduct" runat="server">
<asp:repeater ID="Repeater2" runat="server" DataSourceID="repeaterSrc">
<headertemplate>
<table border ="1" width ="100%">
<tr>
<th> Product Image</th>
<th> Product Details</th>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td><asp:Image height="100" width="100" imageurl='<%# Container.DataItem("Image")%>' runat="server" ID = "Image1"/></td>
<td><%#Container.DataItem("Name")%><br /><br />
<asp:LinkButton ID="LinkButton1" Runat="Server"
Text="Details"
OnCommand="View_Details"
CommandName='<%# Eval("ShopID") %>'/>
<br />
</tr>
</itemtemplate>
<footertemplate>
</table
</footertemplate>
</asp:repeater>
</aspanel>
Thanks
Nishad
I have a repeater control, which display data from database. I'm using the vs express 2005 edition. I have a table Shop which consists of images as well as description of the shop. The images has data type varchar(100) in sql database.
My problem is that i cannot load the images in the datagrid. The description is displaying but not the image.
Can someone please advice me?
The repeater code:
<aspanel ID="pnlShowProduct" runat="server">
<asp:repeater ID="Repeater2" runat="server" DataSourceID="repeaterSrc">
<headertemplate>
<table border ="1" width ="100%">
<tr>
<th> Product Image</th>
<th> Product Details</th>
</tr>
</headertemplate>
<itemtemplate>
<tr>
<td><asp:Image height="100" width="100" imageurl='<%# Container.DataItem("Image")%>' runat="server" ID = "Image1"/></td>
<td><%#Container.DataItem("Name")%><br /><br />
<asp:LinkButton ID="LinkButton1" Runat="Server"
Text="Details"
OnCommand="View_Details"
CommandName='<%# Eval("ShopID") %>'/>
<br />
</tr>
</itemtemplate>
<footertemplate>
</table
</footertemplate>
</asp:repeater>
</aspanel>
Thanks
Nishad