I am trying to switch to ASP.NET Core from my small ASP.NET MVC 4 application.
In my MVC 4 application, I have a layout file that uses a RenderSection like:
@RenderSection("xyz", required: false)
Then in my index file, I:
@section xyz{ @{Html.RenderAction("abc");} }
So, I call the action method abc () of the controller from the index. The abc () method passes a model object and returns a partial view with this model. I cannot use RenderPartial, since it needs a model for the transfer.
Now in the ASP.NET kernel, I don't have the RenderAction () method.
My question is: how can I call the controller action method from my index file? Is there any other HTML helper for this (although I don't see it)?
.
user6542823
source share