Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 26, 2012 08:09 PM by Todilo
Nov 24, 2012 06:59 AM|LINK
I have a View that has a list of Blocks which are rendered using an EditorFor helper. That helper draws BlockItems inside it using editorfor.
Firstly I had to add a for(int .... loop to get the items to be read when posting which now is working. The problem is adding new BlockItems using ajax. I then return a rendered view that used the editorfor template for a BlockItem. However then it does
not get the proper naming which is something like this: Block.BlockItems and does not get interpreted by the model reader. How can this be achieved?
Using MVC 4
Nov 24, 2012 10:54 AM|LINK
he problem is adding new BlockItems using ajax. I then return a rendered view
I used to do this by using a Model that have lines with fake null and a not null line to be displayed.
Nov 26, 2012 08:09 PM|LINK
Do you have an example you could show?
Now I use my container class and have basically "empty" views that just: for(....) type A which renders Type B for loop for editorfor for Type C. Not very clean.