Hi Guys,
I have a blog on my site that has has both a video URL link and a blog teaser Image for the subject and I am trying to put an ifEmpty entry in my transformation so when there is no video link supplied, it will show the blog teaser image. I have tried
<%# IfEmpty(Eval("VideoURL"), "GetImage("BlogPostTeaser")", Eval("VideoURL")) %>
But this throws an error message:
[TempITemplate.Template]: http://server/CMSVirtualFiles/Transformations/=vg=5da44e6c-a3db-4675-86e9-cbff278da00f/CMS.BlogPost/blog_holding.ascx(7): error CS1003: Syntax error, ',' expected
This does not really help me as I dont know where the supposed , is missing from, can you advise please?
Regards
Why are you adding the second parameter as string? It should be just like:
< %# IfEmpty(Eval("VideoURL"), GetImage("BlogPostTeaser"), Eval("VideoURL")) % >
Without the quotes around GetImage function.
Thanks Juraj, that's the answer, thank you :)
Please, sign in to be able to submit a new answer.