Say you have this:
public class ShoppingCart { public IList<CartItem> cartItems {get; set; } }
And you do this to display the class:
<%= EditorFor( m => m.ShoppingCart, "ShoppingCart") %>
How would you do EditFor (??, "CartItem") in ShoppingCart.ascx? I would think it would look something like this:
<% foreach( CartItem myCartItem in m.cartItems) { %><%= EditorFor( ??, "CartItem") %><% } %>
The idea here, of course, is to use a user interface template for the entire class, and not just for the property.
source share