I am using the jquery form plugin but not post this form and throw 500 internal server error.
$("#btnKategoriTip").click(function () {
$("#KategoriTipEkle").ajaxForm({
success: function () {
bootbox.alert("Kategori Tip Eklendi", function () {
location.reload();
});
}
});
});
[HttpPost]
[ValidateAntiForgeryToken]
public void TipEkle(KategoriTipModel tipModel)
{
_kategoriTipRepository.Insert(tipModel);
_kategoriTipRepository.Save();
}
The internal server error is most likely coming from the page you are posting to via ajax. Ajax will return a response from the page via the "success" method. If that response is 500 then that's what you will see.
I would check your code on the receiving page for any syntax errors. This is most likely the cause of your problem. You could try turning on error reporting and see what it spits out in the response.