Hi! im working on getting user input and passing it to the save controller to save it to the database but it doesnt seem to work. I did some searching and tried to use jquery.ajax and jquery.post but it still wont work. Heres my code:
HTML Code:
$.post("/PostCategories/Save",
        getDate(),
        function (data) {
            alert("Saved successfully!");
        });
and I tried this one as well:

HTML Code:
 $.ajax({
                type: "POST",
                url: "@Url.Action("PostCategories", "Save");",
                dataType: "json",
                data: getData(),
                processData: true,
                success: function (data) {
                    alert("Saved successfully!");
                    alert(data);
                },
                error: function (xhr, ajaxOptions, error) {
                    alert(xhr.status);
                    alert("Error: " + xhr.responseText);
                    
                }
            }); // end of ajax
I put a breakpoint in my save controller but it doesnt even reach the controller. Need help!