Because views are essentially HTML, nothing prevents you from manually adding your markup to them, which can include values obtained from the controller either through the model, view bag, or temporary data. ASP.NET Core, however, like previous versions, has built-in methods to assist you in generating HTML that matches your model (structure and content) and displaying model validation errors and other useful model metadata.
Because all of this works on top of the model, for the framework to be able to extract any relevant information, we need to use strongly typed views, not dynamic views; this means adding eitheran @modelor@inheritsdirective to the views with the appropriate model type. To be clear, the model is the object that you pass to theViewResultobject returned from your controller, possibly returned from theViewmethod, and it must either match the declared@model directive in the view or its@inheritdeclaration.
Let's begin by looking...