Reputation: 42390
In ASP.NET Core there is a new feature called "tag helpers", where I can replace my razor syntax
@Html.TextBoxFor(o => o.FirstName, new { @class = "form-control" })
with something a bit more natural
<input type="text" asp-for="FirstName" class="form-control" />
Upvotes: 1
Views: 373
Reputation: 4710
Tag helpers live in the Microsoft.AspNetCore.Mvc
namespace which replaces the System.Web.Mvc
namespace used in earlier versions of ASP.NET.
So it is not available in Pre-ASP.NET Core versions. And I seriously doubt it ever will be. Microsoft would have to go back and make serious changes to System.Web.Mvc
. They've stated many times that they are moving away from System.Web
.
Upvotes: 5