I am trying to use jQuery ajax to save the value that the user entered in the Textbox to the database. But I am struck how to proceed. What I did so far:
User clicks button and I call jQuery function and am calling the controller
comments = $("#txtComments").val();
var request = $.ajax({
url: "/Home/SaveCommentsData",
type: "POST",
data: { comment: comments },
dataType: "json"
});
and I am not sure how to get this comment value in the controller and send a value back to jQuery on success.