Answer the question
In order to leave comments, you need to log in
How to set up serialization of request parameters?
Good afternoon, the problem is this:
there is a model for adding something:
public class Person
{
public int Id { get; set; }
public int Name { get; set; }
public IEnumerable<Tag> Tags{ get; set; }
}
public class Tag
{
public int Id { get; set; }
public int Name { get; set; }
}
@using (Ajax.BeginForm("AddFoo", "MyController", new AjaxOptions { UpdateTargetId = myId, HttpMethod = "POST", InsertionMode = InsertionMode.ReplaceWith }))
{
...
}
Answer the question
In order to leave comments, you need to log in
in the HTML code inside the form it should be some kind of input with the names
"Tags[0].Id"
"Tags[0].Name"
"Tags[1].Id"
"Tags[1].Name"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question