Geeks With Blogs
Doug.Instance Improving the world one post at a time November 2011 Entries
Custom Model Binding of IEnumerable Properties in ASP.Net MVC 2
MVC 2 provides a GREAT feature for dealing with enumerable types. Let's say you have an object with a parent/child relationship and you want to allow users to modify multiple children at the same time. You can simply use the following syntax for any indexed enumerables (arrays, generic lists, etc.) and then your values will bind to your enumerable model properties. 1: <% using (Html.BeginForm("TestModelP... "Home"))2: { %>3: <table>4: <tr><th>ID</... ......

Posted On Tuesday, November 29, 2011 5:29 PM

Copyright © Doug Lampe | Powered by: GeeksWithBlogs.net