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.
Loading...
Related Quiz
- Continuous _________ is a software development practice where changes in the code are automatically tested and prepared for a release to production.
- What is the primary difference between the _ViewImports.cshtml and _ViewStart.cshtml files in Razor?
- During your web development learning, you encounter the term "Razor syntax." How is Razor syntax beneficial in ASP.NET Core development?
- When dealing with complex forms in Razor, which approach allows for grouping related form fields into smaller, reusable views?
- While exploring a sample ASP.NET Core MVC project, you see a folder named "Controllers." What is the primary responsibility of files within this folder?