So far, i don\'t think ViewComponent solves that neither does TagHelper. Is there any replacement to this? Something that takes parameters and retu
ViewComponent
TagHelper
For .NET Core 3, you can use local functions:
@{ void RenderName(string name) { Name: @name } RenderName("Mahatma Gandhi"); RenderName("Martin Luther King, Jr."); }
Name: @name
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-3.1#razor-code-blocks