ASP.NET初学者都会遇到的一个问题,网上找到的方法也是良莠不齐,相信下面这个方法是最好的


string scrīpt = ClientScrīpt.GetPostBackEventReference(this.Button1, null);
this.Button1.Attributes.Add("onclick", "window.document.getElementById('" + this.Button1.ClientID + "').disabled = true;" + scrīpt);


其原理就是发送js到客户端令按钮的disabled为真并回传 

相关文章:

  • 2022-12-23
  • 2021-08-02
  • 2021-12-19
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-17
  • 2021-11-17
  • 2021-11-17
  • 2021-11-17
  • 2022-02-26
相关资源
相似解决方案