From: Deep on
dear friends

I am showing images in repeater this way. why it is not showing.

<asp:Repeater ID="Repeater1" runat="server">
<HeaderTemplate>
<table border="1">
<tr>
<td>Image Title</td>
<td>Image Name</td>
<td>Image</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#DataBinder.Eval(Container.DataItem,
"imageTitle" )%></td>
<td><%#DataBinder.Eval(Container.DataItem, "imageName")
%></td>
<td><asp:Image ID="Diamond" runat="server"
AlternateText="List Item Separator" ImageUrl='~/General/images/<
%#DataBinder.Eval(Container.DataItem, "imageName")%>' /></td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>

Thanks in advance
From: Alexey Smirnov on
On Apr 23, 12:34 pm, Deep <vinod...(a)gmail.com> wrote:
> dear friends
>
> I am showing images in repeater this way. why it is not showing.
>
>   <asp:Repeater ID="Repeater1" runat="server">
>                 <HeaderTemplate>
>                 <table border="1">
>                 <tr>
>                 <td>Image Title</td>
>                 <td>Image Name</td>
>                 <td>Image</td>
>                 </tr>
>                 </HeaderTemplate>
>                 <ItemTemplate>
>                 <tr>
>                 <td><%#DataBinder.Eval(Container.DataItem,
> "imageTitle" )%></td>
>                 <td><%#DataBinder.Eval(Container.DataItem, "imageName")
> %></td>
>                 <td><asp:Image ID="Diamond" runat="server"
> AlternateText="List Item Separator" ImageUrl='~/General/images/<
> %#DataBinder.Eval(Container.DataItem, "imageName")%>' /></td>
>                 </tr>
>                 </ItemTemplate>
>                 <FooterTemplate>
>                 </table>
>                 </FooterTemplate>
>                 </asp:Repeater>
>
> Thanks in advance

ImageUrl='~/General/images/<
%#DataBinder.Eval(Container.DataItem, "imageName")%>'

You can't mix the coding it that way. Try to use

ImageUrl='<%# "/General/images/" + DataBinder.Eval(Container.DataItem,
"imageName")%>'

change "+" to "&" if it's on vb

Hope this helps