Asp.Net MVC Helpers

I've decided to put some work and dig in Asp.Net MVC Helpers libraries. Use of them (even if they are sometimes considered an anti-pattern) can shorten the time to write and the written code dramatically. Below is a short note about those ones that I recently looked over.


This piece below is the most known one, delivered by the Microsoft itself.

Package is of course available on Nuget:

Install-Package Microsoft.AspNet.WebHelpers.Mvc

Official API reference is here:
But I've found second good source:
All public methods are listed here, making it useful reference too.

List of helpers: Analytics, AntiForgery, Bing, Chart, ChartTheme, Crypto, Database, DynamicJsonArray, DynamicJsonObject, Facebook, FileUpload, GamerCard, Gravatar, GravatarRating, HttpAntiForgeryException, Json, LinkShare, LinkShareSite (enum), ObjectInfo, PreApplicationStartCode, ReCaptcha, ServerInfo, SortDirection (enum), StringExtensions, Themes, Twitter, Validation, Video, WebCache, WebGrid, WebGridColumn, WebGridPagerModes (enum), WebGridRow, WebImage, WebMail, WebSecurity.


HtmlHelper methods that are chainable in JQuery style, e.g.(from docs):

@(Html.BuildActionLink("Contact", "Contact", "Home).
                  Attr("data-icon", IconName.Contact).
                  AddClass("ui-state-default", "my-link-style").
                  AddClassWhen(isActive, "ui-state-active").
                  Css("float", "left")

It's easy to add custom attributes therefore use it with any frontend framework.

Nuget package:

Install-Package Build.Mvc5

Build includes extension methods for: ActionLink, TextBox, CheckBox, RadioButton, DropDownList, Label, Hidden, Form, ValidationSummary, ValidationMessage, Button.
To build custom tag you can use "BuildTag" helper.

More info about available methods:

I'll definitely use Build.Mvc more in future projects. With those chainable methods anyone from .Net ecosystem is going to feel like at home.


Just like Build.Mvc TwitterBootstrapMVC makes use of fluent syntax. It brings TwitterBootstrap into the Razor world:

@(Html.Bootstrap().LabelFor(m => m.Amount)
    .LabelText("Amount Left")
@(Html.Bootstrap().TextBoxFor(m => m.Amount)
    .Placeholder("amount in dollars")

Looks promising, I don't even use Bootstrap so much to define if all the Bootstrap features are available. Again, I'll definetely use it in the next Bootstrap-themed project.

Installable by Nuget package + some configuration. Check it out here:


Angular JS Helpers for ASP.NET MVC:
"Instead of using strings, which is not maintainable, use Lambda expressions". Available by a gist here:

@Html.Ng(form => form.Title, new {date="dd/MM/yyyy", xpto="123"}, "currency")
@Html.Ng("form", form => form.Title, new {date="dd/MM/yyyy"}, "currency")


{{ Title | date : 'dd/MM/yyyy' | xpto : '123' | currency }}
{{ form.Title | date : 'dd/MM/yyyy' | currency }}

I believe this example has already said everything in that case.


The last library that I've checked was SchoStack. It is self-described as: MVC helper library that enables the use of Html Conventions, FluentValidation and ActionControllers"
It's actually not only a helper library because AFAIK there are feature controllers inside, and much more. I've found video on Youtube about it:
And a blog post, written by an author:
If you are interested in a convention-based approach then make a stop here for a while, and check this library by yourself. The big minus is a lack of written documentation, so there is high probability you will have to find out a lot of things by yourself. The author claims that it's already used in production.

And you, my reader, what kind of helpers do you use?