在asp.net中隐藏按钮 [英] Hide the button in asp.net

查看:266
本文介绍了在asp.net中隐藏按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在使用JavaScript的按钮事件中编写了一些代码,并调用了按钮事件,在这里工作正常,我的问题是我想隐藏按钮
我这样做是
visible=false这次按钮事件没有触发
enable =false这次按钮事件也没有触发


I write the some code in button event I used the javascript and call the button event it is working fine here my problem is I want to hide the button
I do this as ways
visible=false this time the button event is not firing
enable =false this time also button event is not firing
how can I solve this problem.

推荐答案

在这里可以理解的是,单击按钮时,您希望将其可见性设置为false.您可以通过调用javascript函数来执行按钮的onClientClick事件(如果这是asp.net控件),该过程将类似于:
What is understand here is that on the click of a button, you want to set its visibility to false. You can do this onClientClick event(if this is an asp.net control) of the button, by calling a javascript function, which will be something like:
document.getElementById('<% Button.ClientID %>').visible='false';


希望这对您有用.


I hope this will do the needful for you.


这篇关于在asp.net中隐藏按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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