禁用点击prevent双击后asp.net按钮 [英] Disable asp.net button after click to prevent double clicking

查看:116
本文介绍了禁用点击prevent双击后asp.net按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.NET的按钮,我需要禁用用户点击它以prevent双击后。一旦提交完成它必须被重新启用。谁能帮我这个?

I have an ASP.NET button that I need to disable after the user clicks it to prevent double-clicking. Once the submit completes it has to be enabled again. Can anyone help me with this?

推荐答案

我发现这一点:

<一个href=\"http://tgynther.blogspot.com/2011/07/aspnet-$p$pvent-button-double-click.html\">http://tgynther.blogspot.com/2011/07/aspnet-$p$pvent-button-double-click.html

..它的作品!

btnSave.Attributes.Add("onclick", " this.disabled = true; " + ClientScript.GetPostBackEventReference(btnSave, null) + ";");

这篇关于禁用点击prevent双击后asp.net按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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