I have the following code calling the default ASP.NET MVC
html helper
@Html.LabelFor(model => model.PersonName, htmlAttributes: new { @class = "control-label col-md-2" })
that I have changed for my ASP.NET 5
project to
<label asp-for="PersonName" class="col-md-2 control-label"></label>
If I mistype PersonName
I get a red line below the name however I can still build my project successfully.
For the HTML Helper I always use intellisense by typing model.
so I can't misspell the name.
With the TagHelper I don't have this option as it is a string field.
Is there a way use the same intellisense with the TagHelper as I don't want to discover typing mistakes at runtime.