Author: noidea | Posted on: 12/6/2009 6:00:21 AM | Views : 209

I have pulled records from a database and they are being displayed in a datalist. 3of the fileds in each record contain an image name which I am using to construct a URL and then display the appropriate image, and also create a link from that image. What I want is to be able to not display anything if the field is blank. At the moment if the field is blank I get an image placeholder. What I want is to be able to display nothing at all. How do I check the contents of the field, and if it contains something, write the ASP code that creates a link and an image, and if it contains nothing, don't write the ASP code?
The code I am using at the moment is
<asp:HyperLink Go to the complete details ...