Hi,
I currently have a datalist, which displays an image.
Currently the image is gained using:
in the HTML, as you can see the images are stored in a directory not a DB, and they use the stock items ID. At the moment if the image doesnt exist it just shows the alt text.Code:<%# DataBinder.Eval(Container.DataItem, "stock_id", "images/stock/{0}.jpg") %>
Is there something I can use on ItemDataBound to set the image to images/none.jpg if the image doesnt exist?
I know I can use to FindControl to sweep over the list, but this assigns the image to ALL the images, which isnt what I want.
Many Thanks,




Reply With Quote