日期:2014-05-17  浏览次数:20361 次

如何查找控件容器中的控件的
   我控件的位置说明
   label1 控件,位置 ModalPopupExtender ->(里面的)updatePanel->CreateUserWizard->WizardSteps(1) 
   button1 控件,位置  ModalPopupExtender ->(里面的)updatePanel
   请问下,我在button1 中如何设置 label1的text值啊
  
   我用  Dim myLabel As New Label
        mylabel = CreateUserWizard1.WizardSteps(1).FindControl("Label1")
        mylabel.Text = "www"
          
    提示“未将对象引用设置到对象的实例” 
   查看 mylabel 值为 nothing 
   是不是我的 FindControl没有找到控件啊,大家帮帮忙!

------解决方案--------------------
mylabel = CreateUserWizard1.WizardSteps(1).FindControl("Label1") as label1;