Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
edited tags
Link
N. Taylor Mullen
  • 18.3k
  • 6
  • 51
  • 73
Source Link
Sergey Kandaurov
  • 2.7k
  • 5
  • 27
  • 36

MVC 6 Tag Helpers as Replacement for Editor Templates

MVC 6 introduces Tag Helpers as a better alternative to @Html.EditorFor. It is possible to create custom Editor Template. It's also possible to create a custom Tag Helper.

However, when creating the Tag Helper, the HTML needs to be created by C# code (using TagBuilder, etc.). For complex Tag Helpers it's not as convenient as using a Razor syntax.

Is there any way I'm missing that would allow me to create an custom Tag Helper from a Razor page?