Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Chapter 15. Views

In Chapter 12, you saw how action methods can return ActionResult objects. As you learned, the most commonly used action result is ViewResult, which causes a view to be rendered and returned to the client.

You've seen views being used in many examples already, so you know roughly what they do. In this chapter, we'll focus and clarify that knowledge. We'll begin by showing you how the MVC Framework handles ViewResults using view engines, including demonstrating how to create a custom view engine. Next, we'll describe techniques for working effectively with the built-in Razor View Engine. Then we'll cover how to create and use partial views, child actions, and Razor sections. These are all essential topics for effective MVC development.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint