Which Razor directive is typically used at the beginning of a view file to specify its layout page?
- @layout
- @page
- @model
- @section
The @layout Razor directive is used at the beginning of a view file to specify its layout page in ASP.NET Core MVC. It allows you to define the layout that should be applied to the current view, providing a consistent structure for your web pages.
Loading...
Related Quiz
- For a Web API, you're required to ensure that only authenticated users can access specific endpoints, but some endpoints should be public. How would you achieve this in ASP.NET Core?
- If you needed to add a user to a specific role immediately after creating them programmatically, which method of the UserManager class would you use?
- What command would you typically use to create a new ASP.NET Core web application using the .NET Core CLI?
- In the context of Azure, _________ App Service is a fully managed platform for building, deploying, and scaling web apps.
- To define an optional section in a Razor layout, you would use the _______ method.