I have a input type like first one. I can get values from inputs using Ajax Post To Controller.
public ActionResult GetirKatalog(RequestModel requestModel)
{
////
}
public class RequestModel
{
public string Name { get; set; }
public string SurName { get; set; }
}
I can create more same inputs like the second one using add button. But I can't get values the second one cause the input names changing.
Example :
- First one input names "Name" "Surname"
- Second one input names "Name" "Surname" - "Name2" "Surname2" . . .
How can I request them from Ajax and how can I create model for it ?