You can put it in the Models or App_Code folder (not sure what support in MVC is for this); it would be better to have in a separate library. In addition, html helper extensions are extension methods that must begin with this htmlHelper html parameter, for example:
public static class LabelHelper { public static string Label(this HtmlHelper html, string target, string text) { return String.Format("<label for='{0}'>{1}</label>", target, text); } }
EDIT:. You can reference this in the namespace by adding it to:
<pages> <namespaces>
An element in the configuration file too, so you define the namespace once and refer everywhere.
source share