Discovering MvcContrib

By Digbyswift at September 01, 2009 11:01

Why have I only just found this? Ok, I must admit that when I started researching ASP.Net MVC I was probably overcome with the amount of information I had to digest. So its entirely possible that I missed it or ignored it.

Having briefly read through the documentation MvcContrib provides a massive library of alternatives and additions to the core ASP.Net MVC library. With thousands of downloads, this it usefulness speaks for itself.

So far my personal fave has to be the Grid. I love things that make life easier and this is a gem. There is also a fantastic introduction on the grid this here.

A borrowed example of how easy the Grid is to implement is shown below:

<%= Html.Grid(Model.People).Columns(column => {
         column.For(x => x.Id).Named("Person ID");
         column.For(x => x.Name);
         column.For(x => x.DateOfBirth).Format("{0:d}");
     })
     .Attributes(style => "width:100%")
     .Empty("There are no people.")
     .RowStart(row => "<tr foo='bar'>") %>

Sweeeet.

Comments are closed