2 楼Eddie005(♂) №.零零伍 (♂)回复于 2006-08-02 17:19:35 得分 10

最好是在控件里增加一个public的属性访问  
  public   string   LabelText  
  {  
      get{return   this.Label1.Text;}  
  }  
   
  如果你现在不能改写控件了,那么用FindControl也可以:  
  Label   lbl   =   (Label)WebUserControl1.FindControl("Label1");  
  string   a   =   lbl.Text;Top

3 楼changkongyimen(晋级中...)回复于 2006-08-02 22:37:41 得分 5

Top

4 楼wen7679(文子)回复于 2006-08-03 00:18:45 得分 3

label   默认不是   public   改为public   就可以了Top

5 楼exiori(IORI)回复于 2006-08-03 07:46:50 得分 2

用户属性或是查找控件。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-23
  • 2021-05-15
  • 2022-12-23
  • 2021-11-06
猜你喜欢
  • 2022-01-25
  • 2022-01-03
  • 2021-10-08
  • 2022-02-24
  • 2022-01-27
  • 2021-08-17
相关资源
相似解决方案