Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > How to tell if there is an image View modes: 
User avatar
Member
Member
steven4733-gmail - 1/25/2012 2:10:41 PM
   
How to tell if there is an image
I created a document type, which has a field image, that users upload image using a uploader. This field is not a required field. I found if I use<%# IfEmpty(Eval("Image"),"",...) %> in transmission, it does not tell if it is there. Then how to tell if there is an image?

User avatar
Kentico Support
Kentico Support
kentico_janh - 1/26/2012 1:38:16 AM
   
RE:How to tell if there is an image
Hello,

There is also a IfImage() method, so please use it instead:

<%# IfImage("ImageField", "It is an image", "It isn't an image") %>


Best regards,
Jan Hermann