I am trying to use jQuery ajax to store the value that the user entered into the text box in the database. But I am amazed how to proceed. What i have done so far:
The user presses a button and I call the jQuery function and call the controller
comments = $("#txtComments").val(); var request = $.ajax({ url: "/Home/SaveCommentsData", type: "POST", data: { comment: comments }, dataType: "json" });
and I'm not sure how to get this comment value in the controller and send the value back to jQuery on success.
source share