I have an asp.net site where I need to query an SQL table and return a set of records. One of the columns in the db table, called "ImageURL", contains the path to an image on the webserver associated with that particular record. Some records have images
associated with them, some don't.
I need to set things up so that if an image is associated with the record being displayed, then the image is visible, but if there's no image associated the record (the "ImageURL" field is null or empty), then nothing is displayed.
I'm using a repeater control to display the records, and the item template contains an "asp:Image". My idea is that the "visible" attribute of the image is set to "false" by default, but if the db record has a value for "ImageURL" then the "visible" attribute
becomes "true."
Here's my aspx code:
<%@ Page Language="C#" ...
Go to the complete details ...