What is the equivalent of the above two HTML helpers in MVC6 Tag helper? I want to hide primary key of a model (table) in an MVC Core view using tag Helper.
For @Html.HidenFor(m => m.Property), use <input asp-for="Property" type="hidden"/>.
Tag helpers do not support the older expression name approach. So there's no direct equivalent for @Html.Hidden().
@dougbu It works - thank you. I'm closing the issue.
So a value attribute is not needed?
@dougbu
Most helpful comment
For
@Html.HidenFor(m => m.Property), use<input asp-for="Property" type="hidden"/>.Tag helpers do not support the older expression name approach. So there's no direct equivalent for
@Html.Hidden().