1
I had a problem where a label didn’t appear on the page I was creating with Razor.
I discovered that the problem was because the "string name" parameter had a dot at the end. I wonder if this is an ASP.NET bug or if you have any logical explanation for this problem.
My erroneous code is as follows::
<div class="form-group">
@Html.Label("Codigo Aut.", htmlAttributes: new { @class = "control-label col-md-1" })
<div class="col-md-2">
@Html.TextBox("pesquisaCodigoAutorizacao", null, new { @class = "form-control input-md" })
</div>
</div>
When I remove the "Aut." point that I had used to abbreviate the word "Authorization", then the label will be displayed normally.
<div class="form-group">
@Html.Label("Codigo Aut", htmlAttributes: new { @class = "control-label col-md-1" })
<div class="col-md-2">
@Html.TextBox("pesquisaCodigoAutorizacao", null, new { @class = "form-control input-md" })
</div>
</div>