To pass data from a controller to a view, you can use a ________ object.
- ViewData
- ViewBag
- TempData
- Model
To pass data from a controller to a view, you can use a Model object. Models are classes that define the data structure and properties you want to pass to the view. They enable strong typing and are a fundamental part of the Model-View-Controller (MVC) architecture in ASP.NET Core.
Loading...
Related Quiz
- You've been tasked to deploy an ASP.NET Core application to a cloud platform that supports scaling out based on demand, but you want to minimize management overhead. Which service would be the best fit?
- Which method is commonly used in the Startup.cs file to enable the serving of static files in an ASP.NET Core application?
- When working with ASP.NET Core Identity, user-related data like passwords and email addresses are stored in the _________.
- Your team lead mentions the use of a "_Layout.cshtml" file in your ASP.NET Core project. What is the primary role of this file?
- What is the primary purpose of Razor Layout Views in ASP.NET Core?