Post data to a MVC controller action with jQuery Ajax

Post data to a MVC controller action with jQuery Ajax is easy:

    function UpdateAdres(form) {
        try {
            $("#inhoud").empty();
            $.ajax({
                type: "POST",
                url: "/Adres/Update",
                data: form,
                success: function (data) {
                    $("#inhoud").html(data);
                    $(".hidden").addClass("visible");
                },
                error: function (data) {
                    $("#inhoud").html(data);
                }
            });

        } catch (e) {
            alert(e.message);
        }
    }

 

{{opmerking.Naam}}:

{{opmerking.OpmerkingText}}

            

Saving your comment....

Naam is verplicht!
Email is verplicht!
Opmerking is verplicht!