如何防止用户在Asp.Net中单击按钮两次 [英] How Do I Prevent Users Clicking A Button Twice In Asp.Net

查看:61
本文介绍了如何防止用户在Asp.Net中单击按钮两次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我解决如何防止按钮多次点击的问题。我不得多次执行一次。

Please help me how to prevent multiple clicks for a button. i have to perform only one time not multiple times.

推荐答案

查看这篇文章

在ASP.NET中检测刷新或回发 [ ^ ]


试试这个:



按钮点击事件:

Try this:

In Button click event :
Button1.Enabled = false;





在回发中



In postback

Button1.Enabled = true;


您可以隐藏按钮并显示一些处理按钮图像而不是它。 Google搜索结果 [ ^ ]将为您提供许多其他方式以及代码。
You can hide the button and show some processing button image instead of it. Google results[^] will give you many other ways along with the code.


这篇关于如何防止用户在Asp.Net中单击按钮两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆