Click here to Skip to main content
15,886,816 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I tried to bind image in Repeater control, but it does not showing the image.

I have the code like this.
ASP.NET
<asp:Image id="image1" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"logo"') %>' />


Please help me to solve.

Thanks
Shaju
Posted
v2
Comments
I don't know whether this is a pasting issue on Code Project or not, but it is having one extra quote. So, do like below.

<asp:Image id="image1" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"logo") %>' />
Azee 3-Oct-13 12:04pm    
Could you please specify the actual content of the logo field?

Hey there,

If logo contains the Path of the image, you can make this little modification:
ASP.NET
<asp:Image ID="Image1" runat="server" ImageUrl='<%#Eval("logo") %>' />


Hope it helps.

Azee...
 
Share this answer
 
v4
Comments
ShajuAntony 7-Oct-13 11:35am    
Hi,

Sorry, i need to bind the image in repeater control from table

Shaju

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900