ASP.NET MVC AJAX-post an die controller-Aktion nicht funktioniert

In meinem ASP.NET MVC 4 anzeigen, dass das folgende nicht aufrufen-controller Aktion. Click-Ereignis nicht ausgelöst, weil ich sehen kann, die alert-Meldung. Aber wenn ich einen Haltepunkt auf die controller-action im debug-Modus, die app funktioniert nicht, Punkt, und es passiert nichts wenn ich auf " Ok " auf der Warnmeldung. Ich bin mit LINQ to SQL. Ähnliche Aufrufe zum speichern und einfügen von controller-Aktionen funktionieren:

$('#DeletePOC').click(function () {
                if (confirm("This action will delete this POC record permanently. Click OK if you want to delete this record; otherwise, click 'Cancel'")) {
                    disableButton(['#CancelPOC', '#POC']);
                    $.ajax({
                        url: '@Url.Action("POCDelete")', type: "POST", dataType: "json",
                        data: {
                            SitePOCID: $('#POCId').val()
                        },
                        success: function (data) {
                            $('#POCStatus').html('<div class="success">POC Removed Successfully.</div>');
                        },
                        error: function () {
                            $('#POCStatus').html('<div class="field-validation-error">Some Error Occured in Removing POC.</div>');
                        }
                    });
                }
            });

Controller:
Ich habe getestet, dass bei debug, app nicht erhalten, um diese action-Methode:

[HttpPost]
public ActionResult POCDelete(int id)
{
   db.POC_dsp(id);
   return Json("");
}

InformationsquelleAutor nam | 2014-03-03

Schreibe einen Kommentar