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