Chapter 1. High-speed beginner ramp-up
Listing 1.1. Route definitions
Listing 1.2. The HomeController class
Listing 1.3. The Index.aspx view
Listing 1.4. Creating your first controller
Listing 1.5. The GuestBook Index view
Listing 1.6. An action to respond to the form post
Listing 1.7. The ThankYou.aspx view
Listing 1.8. Using the Html.BeginForm helper to generate a form tag
Listing 1.9. Creating a view model for the GuestBook application
Listing 1.10. Accepting a complex object as an action parameter
Listing 1.11. Changing the Index view to ViewPage<T>
Listing 1.12. Providing the expected model instance to the view
Listing 1.13. Using strongly typed view helpers instead of strings
Listing 1.14. Implementing Post-Redirect-Get
Listing 1.15. The ThankYou view, which uses a helper to display the model object
Chapter 2. Presentation model
Listing 2.1. The CustomerSummary class
Listing 2.2. A controller action preparing the presentation model
Listing 2.3. Defining the model in the Page directive
Listing 2.4. Using the model in the view
Listing 2.5. The input model
Listing 2.6. A view using the input model
Listing 2.7. Model binding form values to the input model
Listing 2.8. A combined display and input model
Listing 2.9. Working with the input model
Chapter 3. View fundamentals
Listing 3.1. Using the ViewResult object to render a view
Listing 3.2. The Profile class
Listing 3.3. The Show controller action
Listing 3.4. Using ViewData information to hide a link