2
I need to check if the attribute of a class is null. If it is null, I would like to hide its label. Below is an example of how it is being displayed today:
The attribute Dating null came, so it would not display its label. Below the HTML code structure:
<div class="label label-primary">
@Html.DisplayNameFor(model => model.DataSolucao)
</div>
<div class="display-field">
@Html.DisplayFor(model => model.DataSolucao)
</div>
<div class="label label-primary">
@Html.DisplayNameFor(model => model.DataFinalizacao)
</div>
<div class="display-field">
@Html.DisplayFor(model => model.DataFinalizacao)
</div>
How should I check ?
Just like that. It worked.
– Raphael Prado de Oliveira