title: Using if has value statement in razor view not working
body: <p>I have a db table with 3 different {price (value> int)} parameters 
  I would like in my view that in case one of them has value in it to display same html code 
  I had tried something like this in my view (not working)</p>
  
  <pre><code>@if(item.price_e.HasValue )
    &lt;text&gt; &amp;euro;
  }
  
  @if(item.price_d.HasValue)
    &lt;text&gt;&amp;#36;
  }
  else
    item.price
  </code></pre>
  
  <p>what the way to do it?
  My view</p>
  
  <pre><code>@foreach (var item in Model) {
    &lt;div class="prod" &gt;
      &lt;div class="prodh"&gt;
        &lt;h3&gt; @item.destination
          @item.City
          @item.pkg_type
        &lt;/h3&gt;
        @item.description
        //i have also tryed this Not working
        @if(item.price !=0) 
        {
          &lt;text&gt;bla
        }
        @if(item.price_d !=0)
        {
          &lt;text&gt;&amp;#36;
        }
      &lt;/div&gt;
    &lt;div class="prodb"&gt;
      @item.date
      @item.company.company_id
      @item.destination&lt;/div&gt;
    &lt;/div&gt; 
  }
  </code></pre>