为什么我的动作控制器在MVC中击中两次?

时间:2017-12-22 05:59:12

标签: asp.net-mvc

@using (Ajax.BeginForm("Form", "Observation", new { area = "" }, new AjaxOptions
{
    HttpMethod = "POST",
    OnComplete = "EditAjaxEnd", // standard function name to becalled to end gif loading
    OnBegin = "EditAjaxStart" // standard function name to becalled to call gif loading

}, new { id = "frmAddEdit", @class = "form-horizontal" })) // always name the form for UI block
{
    Html.RenderPartial("FormReporter");
}

在FormReporter局部视图中,我有一个按钮

<button type="submit" id="btnSave" class="btn btn-lg blue"
        onclick="return CheckAndSubmit();">Save</button>

每次我点击保存动作控制器按两次,以便将记录保存两次。

部分视图需要做些什么吗?

0 个答案:

没有答案