Migrate html helpers to ASP.NET Core
问题 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? 回答1: So, seems there