动态启用/禁用用户控件内的控件

问题描述:

你好,
我要动态地启用或禁用用户控件中的控件取决于我的页面....

我有一个用户控件,
里面有一个文本框.
我想启用此文本框,具体取决于正在使用此控件的页面...
请帮帮我....
紧急.....
在此先感谢.....

Hello,
I Want to enable or disable a control inside a user control dynamically depends on my page....

I have a user control,
inside that i have a textbox.
I want to enable this textbox to be enabled depending upon my Page that is using this control...
Please help me....
urgent.....
Thanks in advance.....

将文本框控件公开为usercontrol的公共属性(使用get-set).一旦可用,便可以通过用户控件实例进行访问并设置其可见性.
Expose that textbox control as a public property of the usercontrol (using get-set). Once it is available, whenever you want, access it through the usercontrol instance and set it''s visibility.