ASP.Net mvc 2.0 beta, supports templates feature. Templates are a way to write reusable view code. They significantly simplifies the code we need to write in views. You can read more about templates here . In this post I will show a way to extend the ModelMetadata and add support for Html Attributes which can be used in templates.
Home / MVC / Tutorials / Chapter 10. Older Versions / ASP.NET MVC Views / TagBuilder Class to Build HTML Helpers Stephen Walther introduces you to a useful utility class in the ASP.NET MVC framework named the TagBuilder class. You can use the TagBuilder class to easily build HTML tags.