Thursday, February 24, 2011

MVC2 Template Helpers

Templated Helpers

In ASP.NET MVC 2.0 newly added feature is Templated Helpers.This allows you to create display screens and
editable screens.
It strongly supports the refactoring,intellisense and compile time checking.
<%= Html.DisplayFor(m => m.Name) %>
Alternatively you can try the
Html.EditorFor()
<%= Html.LabelFor(m =>m.Name) %>