I was struggling with MVC4 razor when binding a list of objects back to model when posting back.
This is not just a single object but object hierarchy with lists inside it. I used templates but I used template for the parent object having the list.
Then I manipulate foreach inside the template. This didnt populate the return values during the post back.
I even tried old way which I used during Java Struts which uses html names with array notations. but failed.
But after going through following article I found that my mistake was not allowing MVC to handle..
It worked nicely.
http://stackoverflow.com/questions/12844763/getting-a-list-of-radio-button-values-in-asp-mvc-3/14825180#14825180
Life, Death, and Splitting Secrets
13 years ago
No comments:
Post a Comment