O'Reilly logo

Pro ASP.NET MVC 4, Fourth Edition by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 20

Image

Templated Helper Methods

The HTML helpers that we looked at in the previous chapter, such as Html.CheckBoxFor and Html.TextBoxFor generate a specific type of element, which means that we have to decide in advance what kinds of elements should be used to represent model properties and to manually update our views if the type of a property changes.

In this chapter, we demonstrate the templated helper methods, with which we specify the property we want displayed and let the MVC Framework figure out what HTML elements are required. This is a more flexible approach to displaying data to the user, although it requires some initial care and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required