Reputation: 26936
A repeater control is bound to array of items with class that has boolean IsClosed property. I want to display one picture if it is true, and another if it is false. I can't just add a property to my item class that would return the exact path to the image, so I need some sort of function that would process IsClosed property for each data item inside Repeater's DataSource. But how do I write a proper binding expression? Code like:
<%# Eval("IsClosed") %>
works, but code like:
<%# GetIconPath(Eval("IsClosed")) %>
doesn't work.
Upvotes: 0
Views: 311