Hi,
Could you you tell me the best way to get data from UI to send them to the controller. What do you think a bout the code below ? Is there an another solution without all this javascript/jquery/ajax code ?
Thanks,
function CustomerAddSave() {
$('#btSave').bind('click', function (event) {
$.ajax({
type: "POST",
url: "/Customer/CustomerSave",
data: {
id: $('#Id').val(),
firstName: $('#FirstName').val(),
lastName: $('#LastName').val(),
isEnable: $('#IsEnable').attr('checked')
},
success: function (html) {
},
error: function (XMLHttpRequest, textStatus, errorThrown) { }
});
});
}