Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • hetaurhet 245 posts 267 karma points
    Feb 28, 2012 @ 06:16
    hetaurhet
    0

    img visible/invisible at run time

    hello

    I want a particular img to be visible only for condition ( (published date+7)  >= today's date ) ... if true, then only show image.

    <img class="new-faq" src="/images/icon/tag.png" width="34" height="18" alt="tag"  align="absmiddle"/>

    how to write this in razor?

  • Rodion Novoselov 694 posts 859 karma points
    Feb 28, 2012 @ 16:19
    Rodion Novoselov
    0

    Hi. Somehow like:

    @if(Model.UpdateDate.AddDays(7).Date >= DateTime.Today) {
          <img bla-bla-bla/>

     

  • hetaurhet 245 posts 267 karma points
    Feb 29, 2012 @ 05:26
    hetaurhet
    0

    thanks .. I wanted this only.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies