Html.RenderPartial and Ajax.BeginForm -> Submit is called twice

前端 未结 2 775
无人及你
无人及你 2020-12-28 08:12

I have the following index view:

@model BoringStore.ViewModels.ProductIndexViewModel
@{
    ViewBag.Title = \"Index\";
}

Produkte

<
2条回答
  •  醉酒成梦
    2020-12-28 09:08

    insure that you dont have jquery.unobtrusive-ajax.min.js file duplicated in the layout as mentioned above, and you can check this using browser Inspectors

    Another problem which may cause this error that i have encountered is resting a form using jquery in the ajax request as following

    $("form").trigger("reset"); //just remove this line
    

提交回复
热议问题