Hi I have an action in my controller, i am waiting to ModelBinder bind the incoming postdata to my action parameter but it doesnt do this, i dont know. I only manually bind them with TryUpdateModel() but i dont want to use it. Property names and the postdata are the same why it cant bind them ?
public class User
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Username { get; set; }
public string Password { get; set; }
}
public ActionResult Update(User user)
{
// TODO
}
My javaScript Code that send data to my Action:
newData = {
"FirstName":"Yucel"
"LastName": "Akpınar",
"Email": "yucelakpinar",
"Password": "123456"
};
$.ajax({
type: "POST",
dataType: "json",
data: newData,
url: "/Profile/Update",
success: function() {
debugger;
}
});