16
Vote

Non-sequantial list binding and BeginCollectionItem HTML Helper

description

In ASP.NET MVC framework, for non-sequential list binding we need a random prefix for the form field name and also a hidden imput which indicates that item inside the collection.

Inside the framework, we do not have any HTML helper method to automate that process. A while back ago, Steve Sanderson wrote a blog post demonstrating a sample on non-sequantial list binding. He used a HTML helper method there called BeginCollectionItem which he created.

I wonder if something like this can be baked into the framework. Any thoughts?

Note: More info about this issue: http://aspnetwebstack.codeplex.com/discussions/351576

comments

HongmeiG wrote Sep 10, 2012 at 6:24 PM

This sounds like an interesting feature. Could you please send a pull request so that we can take a look at it?

tugberk wrote Sep 10, 2012 at 11:14 PM

@HongmeiG As explained under this discussion (http://aspnetwebstack.codeplex.com/discussions/351576), Steve Sanderson has basically written that code. I am not sure if that would be a good idea to send a PR with the code that he has written by himself.

Rookian wrote Nov 21, 2012 at 4:01 PM

What's up with this feature request? I would appreciate it to have strongly typed Html helper methods for binding to a list object.

yishaigalatzer wrote Sep 5, 2013 at 9:35 PM

Moving to 5.1 Preview for consideration by the team