is there any example to post multiple objects to a controller. How the data for the ajax post have to look like ?
[HttpPost]
public string Register(UserLogin userLogin, Contact contact)
{
}
UserLogin
public class UserLogin
{
public string Username { get; set; }
public string Password { get; set; }
}
Contact
public class Contact
{
public string Firstname { get; set; }
public string Lastname { get; set; }
}
AJAX ?
$.ajax({
type: "POST",
url: "SomeUrl"
dataType: "json",
contentType: "application/json; charset=utf-8",
data: ? });