How to prevent double submit with jQuery in ASP.NET app with UpdatePanels

后端 未结 1 2033
旧时难觅i
旧时难觅i 2020-12-11 11:49

I have an Intranet ASP.NET application which is sometimes slow to respond. My requirement is to prevent double submit, and ideally provide feedback to the user that the for

1条回答
  •  时光说笑
    2020-12-11 12:18

    You place an allow/not allow to submit form base on a flag, as:

    Page.Form.Attributes["onsubmit"] = "return fAllowToSubmit();";
    

    and you open close the flag for the submit when you send via updatepanel and wait for return.

     
    

    and the

    .FadedDiv
    {
        background-color: white;
        filter:alpha(opacity=50);
        opacity: 0.5;
        -moz-opacity:0.50;
    }
    

    Of course you have also the "please wait" message that can open automatically with the update panel.

    0 讨论(0)
提交回复
热议问题