When designing a Razor Layout in ASP.NET Core, which directive is used to render the main body content of child views?

  • @RenderBody()
  • @RenderContent()
  • @IncludeBody()
  • @RenderSection("MainContent")
In an ASP.NET Core Razor Layout, you use @RenderBody() directive to render the main body content of child views. This directive tells the layout to include the content from the child view. The other options are either incorrect or not commonly used for this purpose.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *