Display Images in datagrid

Joined
Jan 10, 2009
Messages
1
Reaction score
0
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:

<asp:panel 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>
</asp:panel>

Thanks
Nishad
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top