title: How to hide the asp-for label element if the value of displayfor element is empty?
body: <p>In my cshtml class for details, I do need to disable the label(asp-for) if the value of displayfor is empty.</p>
  
  <pre><code>@*For simplicity I put only part of the code as everything below is pretty much the same piece of code *@
  &lt;div align="center"&gt;
  &lt;div class="media-middle" style="width: 600px;"&gt;
      &lt;table class="table glyphicon-align-center"&gt;
          &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;th&gt;&lt;label asp-for="StrainName"&gt;&lt;/label&gt;&lt;/th&gt;
                  &lt;td&gt;@Html.DisplayFor(model =&gt; model.StrainName)&lt;/td&gt;
              &lt;/tr&gt;
  </code></pre>
  
  <p>I would be thankful if someone gives me  an idea  about how to realize this code and where it is better to implement the code( cshtml class or in a controller)</p>