@Html.Action in Asp.Net Core

Yes, ViewComponents would be the new way of doing this, but they are not exactly the same as what @Html.Action was doing before though…for example, in MVC5 and prior, invoking ‘child actions’ would also execute any filters (for example, if the controller had filters decorated on them) giving them the appearance as regular actions…but this is not true with ViewComponents and they are executed in the context of actual request…

More info on view components:
https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-components

Leave a Comment