Search In
Learn from 350 other Umbracians at the annual Umbraco Conference - CodeGarden '13. More than twenty high quality sessions, open spaces, hackathons and social events you'll remember. Not to be missed! Less than 25 tickets left - get yours now!
Hi Guys,
Is there any example of how to check a empty upload field in razor like you would do in XSLT?
XSLT
<xsl:variable name="pdfFile" select="newsFile" /> <xsl:if test="$pdfFile != ''"> <a target="_blank"> <xsl:attribute name="href"> <xsl:value-of select="newsFile"/> </xsl:attribute> </a> </xsl:if>
And Razor is it something like
@if(String.isNullOrEmpty.newsFile != null)
@if(!String.IsNullOrEmpty(Model.newsFile))