Hi DG Kumar,
Here is a small example of an ajax call to a controller action to save data into database.
Ex :-
function UpdateUserName(ID, Name) {
var objParams = { id: ID, name:Name };
$.ajax({
type: "POST",
url: { application context path } + "Common/UpdateUserName",
data: objParams,
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
success: function (response) {
if (response != null && response != undefined) {
}
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
}
});
}
Hope this can be of help for you.
Also here some of the links to give you some correct way to do all CRUD operation using MVC & JQuery.
1)
http://www.dotnet-tricks.com/Tutorial/mvc/42R0171112-CRUD-Operations-using-jQuery-dialog,-Entity-Framework-and-ASP.NET-MVC.html[
^]
2)
http://www.c-sharpcorner.com/Blogs/14611/insert-delete-update-read-crud-operation-in-mvc-4-0-using.aspx[
^]