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 http://thekevincode.com/2010/09/adding-email-confirmation-to-asp-net-mvc/
2. Creating enum based drop down select boxes was easy - just used http://blogs.msdn.com/b/stuartleeks/archive/2010/05/21/asp-net-mvc-creating-a-dropdownlist-helper-for-enums.aspx - then in Razor:
@using MyExtensionsNamespace
Some HTML
@for (var i = 0; i < Model.MyProperty.Count; i++)
<div>
@Html.EnumDropDownListFor(model => model.MyProperty[i].MyEnumField)
</div>
}
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