如何处理禁用我的控件或忽略它 [英] How can I handle disabling my control or ignoring it

查看:62
本文介绍了如何处理禁用我的控件或忽略它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我写了一个自定义用户控件(.ascx),放在我的asp.net页面里面一个面板。

当我禁用面板(因为我不希望用户能够更改内容)时,我的用户控件也会禁用当然预期的行为。



到目前为止,非常好。

这就是扭曲:我的用户控件上有一个链接按钮,不应该被禁用。



有人知道如何覆盖特定控件的禁用行为吗?

忽略禁用整个自定义控件然后处理启用/禁用也可以我自己。我可以覆盖ondisable - 事件吗?



问候,



Felix

Hi everyone!

I have written a custom user control (.ascx) which is put on my asp.net page inside a panel.
When I disable the panel (because I don't want the user to be able to change content) my user control also disables which is expected behavior of course.

So far, so good.
Here comes the twist: There is a linkbutton on my usercontrol that should NOT be disabled EVER.

Does anybody know how I can override the disabling behaviour of a specific control?
It would also be okay to ignore disabling the whole custom control and then handle enable/disable by myself. Can I override a "ondisable"-event or something?

Greetings,

Felix

推荐答案

链接..



http://stackoverflow.com/questions/12176347/how-to-disable-user-control-from-code-behind [< a href =http://stackoverflow.com/questions/12176347/how-to-disable-user-control-from-code-behind\"target =_ blanktitle =New Window> ^ ]

从a.aspx页面禁用网络用户控制按钮 [ ^ ]

http://forums.asp.net/t/1535736.aspx?Enable+disable+button+in+ascx+user+control+based+upon+textchange+event+in+usercontrol+Both + + + +用户+控件+ [ ^ ]
Links..

http://stackoverflow.com/questions/12176347/how-to-disable-user-control-from-code-behind[^]
disable a button in web user control from a.aspx page[^]
http://forums.asp.net/t/1535736.aspx?Enable+disable+button+in+ascx+user+control+based+upon+textchange+event+in+usercontrol+Both+are+in+user+control+[^]


这篇关于如何处理禁用我的控件或忽略它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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