O'Reilly logo

Applied ASP.NET 4 in Context 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

Using the Templated Helper Methods

The MVC framework includes a set of helpers that take a different approach to rendering HTML for data items. Rather than choosing the HTML element we want and then using the corresponding helper, we simply pass the data item to the helper and let it figure out which HTML element should be used. These are known as the templated helpers because the choice of HTML element is driven by a simple template system. Table 26-4 describes the templated helper methods.

image

To demonstrate the templated view helpers, I have created a view model class called CompetitionSummary in the Models/View folder. I have more to say about ...

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