I'm converting a project to ASP.NET Core. I need to migrate lots of reusable html helpers, but html helpers do not exist in Core.
Some are complex, some simple. Here's a extremely simple example:
@helper EditIcon()
{
<i class="glyphicon glyphicon-pencil"></i>
}
Note that this is only an example.
Point is writing a tag helper for that is gigantic overkill. Same for partials. Same for view components.
We're talking about a little snippet of Razor. What is my best option?
The helper directive is not supported.
– Hump@helper
has been removed in core-mvc - you need to use view components etc – Cabotage@helper
was an mistake by MVC team anyway and its good to see they are gone) – Cabotage