禁用Asp.Net按钮控件 [英] Disable Asp.Net button control
本文介绍了禁用Asp.Net按钮控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想防止用户在按钮已经执行并且未完成过程时在按钮上单击两次.
我正在使用Asp.Net Framework 2.0,当用户在已经执行的按钮上单击两次时,我遇到了问题.我想在程序执行时禁用所有按钮,并在过程完成后再次启用它们.很久以前:
http://www.abstraction.net/content/articles/防止%20double%20form%20submit%20in%20asp.net.htm [ http: //blog.ysatech.com/post/2009/08/13/Disable-an-ASPNET-button-during-PostBack-with-AJAX-loading-background-image.aspx [ 解决方案
I''ve used a from of this successfully, a long time ago:
http://www.abstraction.net/content/articles/preventing%20double%20form%20submit%20in%20asp.net.htm[^]
Don''t remember the details, but might give you some insight.
Hi,
See the following link, here you find the code:
http://blog.ysatech.com/post/2009/08/13/Disable-an-ASPNET-button-during-PostBack-with-AJAX-loading-background-image.aspx[^]
in button click write the first line code as
Button1.Enabled = false; //put your code here....after executing the code Button1.Enabled = true;
这篇关于禁用Asp.Net按钮控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文