CHAPTER 21

image

Helper Methods

In this chapter, I look at the helper methods, which allow you to package up chunks of code and markup so that they can be reused throughout an MVC Framework application. I start by showing you how to create your own helper methods. The MVC Framework comes with a wide range of built-in helper methods, and I explore them in this chapter and the next two chapters, starting with the helper methods that you can use to create HTML form, input and select elements. Table 21-1 provides the summary for this chapter.

Table 21-1. Chapter Summary

Problem

Solution

Listing

Create a region of reusable markup within a view

Get Pro ASP.NET MVC 5, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.