ASP.NET MVC Custom View Helpers

With ASP.NET MVC there are some extension methods on the HtmlHelper object (I'm calling these View Helpers) which help developers to create their views. For example if someone needs to create a text input field inside of their view they can use a statement like <%= Html.TextBox("FirstName") %>. This article describes why developers might want to create their own methods similar to this and exactly how to do it.
Along with the article there is a fully functional, but very simple contact manager application, which demonstrates the difference of views created with and without the custom view helpers.

You can download the 22 page article as well as sources at

There is now a Chinese version of the article available at Translation provided by CareySon.

Written by Sayed Ibrahim Hashimi

Last edited Jan 8, 2010 at 11:57 AM by sayed_hashimi, version 7