Bug reports Found a bug? Post it here please.
Version 7.x > Bug reports > href show only url is there other wise not showing url View modes: 
User avatar
Member
Member
shubhnath-clavax - 10/25/2013 1:11:33 AM
   
href show only url is there other wise not showing url
Hi,

my problem was my url linking show every image those image url is not there in database ,
i want to show only those url whose contain only url other wise no need to show url linking ,

Please suggest what the process i follow

i am using in my transformation <a href= <%# Eval("NewsURL",true) %> target="_blank">

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 10/26/2013 5:07:36 PM
   
RE:href show only url is there other wise not showing url
Hello,

You can use one of the methods available for transformations, especially in this case, it's method IfEmpty.

You can see a nice example in the Context help:
<%# IfEmpty(Eval("ProductPhoto"), "no image", GetImage("ProductPhoto")) %>
• Checks for emptiness of the value specified in the first parameter. If it is NULL, the second parameter is returned. If it has some value, the third parameter is returned.

Best regards,
Martin Danko