title: .net mvc Display field in view only if it has a value
body: <p>I have some Customer Details and I only want to show fields which have a value.</p>
  
  <p>For example if Telephone is null don't show it.</p>
  
  <p>I currently have in my view model</p>
  
  <pre><code>    public string FormattedTelephone
      {
          get { return string.IsNullOrEmpty(this.Telephone) ? " " : this.Telephone; }
      }
  </code></pre>
  
  <p>And in my view</p>
  
  <pre><code>@Html.DisplayFor(model =&gt; model.FormattedTelephone)
  </code></pre>
  
  <p>This is working correctly, however, I would like to show the Field Name if the field has a value e.g.</p>
  
  <p><strong>Telephone:</strong> 02890777654</p>
  
  <p>If I use <code>@Html.DisplayNameFor</code> in my view it shows the field name even if the field is null.</p>
  
  <p>I also want to style the field name in bold and unsure of where I style it - the view or the view model.</p>