Saturday, November 27, 2010

Ssssshhhh - don't tell anyone but I'm enjoying web dev with ASP.Net MVC3 and Razor

Just very impressed at the moment that my ViewModels are flying in/out of my Controllers with quite a lot of ease...

Also impressed with how clean Razor feels compared to old ASP.Net

Also impressed with how easy it is to extend the Expression<> based HtmlHelper code.


A couple of things I've done that show how I'm techie enjoying myself:
1. Enabling email verification was easy -  mainly thanks to Kevin at 

2. Creating enum based drop down select boxes was easy - just used - then in Razor:

@using MyExtensionsNamespace


@for (var i = 0; i < Model.MyProperty.Count; i++)
@Html.EnumDropDownListFor(model => model.MyProperty[i].MyEnumField)

3. Using list collections was easy - see the snippet above - it just works when you then collect the ViewModel back in to the Controller Action method too :)

4. Adding my own Model error was easy with ModelState.AddModelError 

No comments:

Post a Comment