Hi there,
Recently I have changed languages from VB.NET to C#.
While in VB.NET, I wrote the below code to determine if a specific
product in a repeater control had an image. If so, it would display
the appropriate image; if not, would display a placeholder.gif .
I now need to convert the below code to C# and am having a brutal time
at it. I do understand the simple syntax behind using the ternary
operator
ie: (bBoolean)?(aIm age):(bImage), but for the life of me cannot make
the below code fly in C#.
<%# IIf(Container.D ataItem("hasima ge") = true, "<img
src='ProductImg Small/" & Container.DataI tem("prodid") ".gif'>",
"<img 'ProductImgSmal l/PlaceHolder.gif ' >") %></a>
Thanks in advance,
Darren