Are you using ASP.NET MVC? If so you may be interested in an article that I've just made available on Codeplex published to ASP.NET MVC Custom View Helpers. View helpers are usages of extension methods to insert markup into your pages. For example <%= Html.TextBox("username") %>
and <%= Html.ValidationMessage("username") %> are both using view helpers. These are really just extension methods on the HtmlHelper class. There are a few different ways that you can create your own custom view helpers. I examine the different approaches, discuss the current implementation of the view helpers shipped with ASP.NET MVC itself, and I provide some helper classes for you to create your own custom view helpers.
ASP.NET MVC Custom View Helpers
Sayed Ibrahim Hashimi