Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
protected void btnsave_Click(object sender, EventArgs e) { btnsave.Enabled = false; . . // processing code btnsave.Enabled = true; }
但是按钮永远不会被禁用?我只是想避免多次点击(避免数据冗余)?(即使有更新面板,调用 UpdatePanel.Update() 也不会改变)
您可以使用以下代码进行操作:
OnClientClick="this.disabled='true';return true;"
可能的重复
如何防止用户单击按钮两次?
我希望它会帮助你。:)