0

I use this model;

Test
---
public string testdata { get; set; }
public int testvalue { get; set; }
public virtual List<othertest> othertest { get; set; }

othertest
---
public string othertestdata {get;Set;}
public int othertestvalue {get;set;}

My razor view code is ;

@model Sample.Models.Test

@Html.EditorFor(model => model.testdata, new { htmlAttributes = new { @class = "form-control" } })
@Html.EditorFor(model => model.testvalue, new { htmlAttributes = new { @class = "form-control" } })

That's ok until here. ı need create list element but doesn't model.othertes[0].othertestdata etc.

sample

When i click plus, add raw to html and Mvc has to add to virtual list element.

How can i do this.? what should i do? ı need suggesstion. ty..

my english is bad. Sorry for this. I hope you can understand me.

Serkan
  • 33
  • 9
  • Refer the answers [here](http://stackoverflow.com/questions/29161481/post-a-form-array-without-successful/29161796#29161796) and [here](http://stackoverflow.com/questions/28019793/submit-same-partial-view-called-multiple-times-data-to-controller/28081308#28081308) –  Mar 13 '16 at 21:36
  • thank you so much. – Serkan Mar 14 '16 at 18:12

0 Answers0