x First time here? Check out the FAQ
  • Avatar2079posts3915karma

    Checked an upload file with razor

    Fuji Kusaka started this topic March 2, 2012 @ 11:52

    Hi Guys,

    Is there any example of how to check a empty upload field in razor like you would do in XSLT?


     <xsl:variable name="pdfFile" select="newsFile" />   
              <xsl:if test="$pdfFile != ''">
                  <a target="_blank">
                    <xsl:attribute name="href">                    
                       <xsl:value-of select="newsFile"/>                                  

    And Razor is it something like

    @if(String.isNullOrEmpty.newsFile != null

  • Dennis Pedersen posted this reply March 2, 2012 @ 02:48

Please login or Sign up To post replies