//方法一:在提交时调用一段客户端的代码。
function a()
{
    document.getElementById(
"btnok").value = '正在提交【转帖】防止ASP.NET按钮多次提交的办法';
    document.getElementById(
"btnok").onclick=function(){return false;};
    
return true;
}
<input id="btnok" runat="server" type="submit" value="确定" onclick="return a();" 
onserverclick
="Submit1_ServerClick" />


//方法二:必需要是 Asp.net服务器控件。(注意UseSubmitBehavior属性)
<asp:Button ID="btnSumbit" runat="server" UseSubmitBehavior="false" 
OnClientClick
="this.value='正在提交【转帖】防止ASP.NET按钮多次提交的办法';this.disabled=true; " 
Text
="提交" OnClick="btnSumbit_Click" /> 

 

 

相关文章:

  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2021-05-06
  • 2022-12-23
猜你喜欢
  • 2021-08-09
  • 2021-08-06
  • 2022-03-07
  • 2022-12-23
  • 2022-01-02
相关资源
相似解决方案