单击按钮时禁用asp链接按钮 [英] disable asp link button on button click

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

问题描述

HI,
请帮助我,我在asp.net页面上有一个链接按钮,我想在单击后禁用它,而后邮包意味着当我单击它时,我想在此之后立即禁用此按钮,后面应该执行,请帮助我解决我的问题.


Please help me ,I have a link button on an asp.net page i want to disable it after click on it before post pack means when i click on it i want disable this button immediately after this the behind should execute please help me for resolve my problem.

推荐答案

在按钮上运行客户端javascript单击此脚本,您可以执行类似
的操作
Have a client side javascript running on the button click in this script you can do something like

document.getElementById("button1").disabled = true;



然后发生一个postbalc,您可以从服务器端代码重新启用它.



and then one the postbalc occurs you can re-enable it from server side code.


在链接按钮的声明中添加以下内容


onClientclik ="return false"
add following in declaration of Link Button


onClientclik="return false"


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

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