I have a partial view that renders a list of objects into a table format and allows editing of the values...
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IList<whoozit.Models.PictureModel>>" %>
<% foreach (whoozit.Models.PictureModel p in Model)
{ %>
<td>
<%: Html.TextBox("name",p.name) %>
<%: Html.ValidationMessage(p.name) %>
</td>
<% } %>
I'm wanting to refactor this to take advantage of the strongly typed html helpers in mvc2. I am running into difficulty understanding how to create the lambda expressions and was hoping for some help. the following doesn't seem quite correct to me.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IList<whoozit.Models.PictureModel>>" %>
<% foreach (whoozit.Models.PictureModel p in Model)
{ %>
<td>
<%: Html.TextBoxFor(???) %>
</td>
<% } %>