How do I render a partial form element using AJAX
For an ajax call you have to build the model: $.ajax({ type: “POST”, url: ‘@Url.Action(“AddPreference”, “Main”)’, data: { Field1: ‘field1’, Field2: ‘field2’ }, success: function (html) { $(html).appendTo(‘#additionalPreference’); console.log(html); }, error: function (xhr, ajaxOptions, thrownError) { alert(“Error”); }, complete: function () { console.log(“End”); }); Make sure that the names in the data section of the … Read more