At first - sorry for my broken English. May be it is stupid question, but.... So, I have a model
public class AAAModel {
public int I1 {get; set}
public string S1 ...
public Guid G1 ...
}
I have a controller
public ActionResult Create(AAAModel WhatToCreate){
...
}
And I have a proper view to enter the data... All was fine, but now I must reorganize view to create several form and give the user ability to dynamically create new objects (model) and send query to the server. The data, that I got from server cames as Ajax query and parsed to the table grid... User may view this data, correct it and may send it back. So, I make several forms wich I duplicate from initial view and change the ID and Name of the controls Originally it was like
@Html.TextBoxFor(model => model.I1)
@Html.TextBoxFor(model => model.S1)
@Html.TextBoxFor(model => model.G1)
And now it bacame like
<input id="I1_1" name="I1_1 ...>
<input id="S1_1" name="S1_1 ...>
<input id="G1_1" name="G1_1 ...>
in form 1;
<input id="I1_2" name="I1_2 ...>
<input id="S1_2" name="S1_2 ...>
<input id="G1_2" name="G1_2 ...>
in form 2, and so on... Stupid question, but how can I modify the controller or what I have to do to got these values?
P.S. These forms will send via ajax... and host-page will not reload.