Chapter 3. View fundamentals

This chapter covers

  • Providing data to the view
  • Using strongly typed views
  • Understanding view helper objects
  • Developing with templates

The view’s responsibility can be deceptively simple. Its goal in life is to take the model given to it and use it to render content. Because the controller and related services already executed all the business logic and packaged the results into a model object, the view only needs to know how to take that model and turn it into HTML. Although this separation of concerns removes much of the responsibility that can plague traditional ASP.NET applications, views still need to be carefully and deliberately designed. Views require knowledge and understanding of the building blocks ...

Get ASP.NET MVC 2 in Action now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.