The @ViewData object is a type of _________, allowing you to pass data from the controller to the view.
- Dictionary
- List
- Class
- Interface
The @ViewData object is a type of Dictionary in ASP.NET Core. It is used to pass data from the controller to the view. ViewData allows you to share data between different parts of your application, making it available for rendering in the view.
Loading...
Related Quiz
- While learning about Razor views, you come across a file that seems to determine the layout for all views. What is the typical name of this file?
- When using the [Authorize] attribute with policies, the specified policy name must be previously registered in the _________.
- What is the primary purpose of the [Authorize] attribute in ASP.NET Core?
- The asp-action attribute in a Razor form specifies the _________ to which the form will be submitted.
- You're building an application where some static files need to be accessible only for authenticated users. How might you achieve this in an ASP.NET Core application?