Practicing and exploring
Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.
Exercise 16.1 – Test your knowledge
Answer the following questions:
- What do the files with the special names
_ViewStart
and_ViewImports
do when created in theViews
folder? - What are the names of the three segments defined in the default ASP.NET Core MVC route, what do they represent, and which are optional?
- What does the default model binder do, and what data types can it handle?
- In a shared layout file like
_Layout.cshtml
, how do you output the content of the current view? - In a shared layout file like
_Layout.cshtml
, how do you output a section that the current view can supply content for, and how does the view supply the contents for that section? - When calling the
View
method inside a controller's action method, what paths are searched for...