Problem in Repeater

C

Calvin

Hi,

If I have a repeater to display data from a table.
Consider inside the ItemTemplate, I have a column (<td>)
that display a icon depending if the Table Column C2 is
true or not. How could I implement this onto a Repeater?
Thanks.

i.e.
.....
<td><%# Databinder.Eval(Container.DataItem,"ICON") %></td>
...

this will only show if it is on or not. But I want to show:
<td><img src="..."></td>


Thanks again for all help!
Calvin
 
L

Lostinet.Web Support

<%# Convert.ToBoolean(Databinder.Eval(Container.DataItem,"ICON")) ?
"htmlcode if true" : "htmlcode if false" %>
 

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

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top