kmerlihan-ecentricarts
-
3/20/2011 7:39:17 PM
Transformation ifEmpty and %nbsp;
Hi there!
I have created a doctype for my client to enter a description about a media item. If they leave the field empty, I would like to use a default text.
This is the code i have in the transformation: <p><%# IfEmpty(Eval("MediaInfo"), "Some default text", Eval("MediaInfo")) %></p>
I think this should work, however if "MediaInfo" is left blank, the wysiwyg editor adds in " " and it is no longer blank. The default text is never used.
Any thoughts?
Cheers Kathryn
|