日期:2014-05-19  浏览次数:20877 次

Repeater 中的 Button 的 Enable 属性怎么设置? 在线等
Repeater1   中有个   Button1,   我想在   Page_Load   中如果   Session[ "ID "]==null便设置为   Button1   的   Enable   属性为   false   ,该怎么写代码?

Repeater1.FindControl( "Button1 ").XXX=false;
可这里的   XXX   没有Enable   属性啊   怎么写?

------解决方案--------------------
(Button)Repeater1.FindControl( "Button1 ").XXX=false;
------解决方案--------------------
((Button)Repeater1.FindControl( "Button1 ")).Enable = false;