title: Conditional display elements with Razor
body: <p>Is there a smarter way to show/hide elements conditionally (with razor) than this below? The view is very large and I'm concerned about maintenance:</p>
  
  <pre><code>@if(@Model.Atendimento.PrazosEEntregas.Visivel)
  {
      &lt;div&gt;
          &lt;h4&gt;Prazos e entrega do serviço&lt;/h4&gt;
  
          @if (!string.IsNullOrWhiteSpace(@Model.Atendimento.PrazosEEntregas.PrazoFinalizacaoServico))
          {
              &lt;p&gt;@Model.Atendimento.PrazosEEntregas.PrazoFinalizacaoServico&lt;/p&gt;
          }
  
          @if (!string.IsNullOrWhiteSpace(@Model.Atendimento.PrazosEEntregas.PrazoRetiradaDocumento))
          {
              &lt;p&gt;&lt;strong&gt;Prazo de retirar o documento:&lt;/strong&gt; @Model.Atendimento.PrazosEEntregas.PrazoRetiradaDocumento&lt;/p&gt;
          }
  
          @if (!string.IsNullOrWhiteSpace(@Model.Atendimento.PrazosEEntregas.OndeRetirarServico))
          {
              &lt;p&gt;&lt;strong&gt;Onde retirar/receber:&lt;/strong&gt; @Model.Atendimento.PrazosEEntregas.OndeRetirarServico&lt;/p&gt;
          }
  
          @if (!string.IsNullOrWhiteSpace(@Model.Atendimento.PrazosEEntregas.ObservacaoPrazoRetirada))
          {
              &lt;p&gt;&lt;strong&gt;Observação:&lt;/strong&gt; @Model.Atendimento.PrazosEEntregas.ObservacaoPrazoRetirada&lt;/p&gt;
          }
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>Thanks,
  Hoisel</p>