1.在用户控件Usercontrol1中用一个Label1
2.在aspx中引用为   <uc1:WebUserControl1 id="WebUserControl11" runat="server"></uc1:WebUserControl1>
3 在aspx.cs 中加入:   protected WebUserControl1 WebUserControl11;
4 在Button 中加入: 
  
  private void Button1_Click(object sender, System.EventArgs e)
  {
  Label label = (Label)WebUserControl11.FindControl("Label1");
  label.Text = "my name is yxx";
  }

解决方案 »

  1.   

    不好意思上面是C#的,在我的机上ok.
      

  2.   

    protected WebUserControl1 WebUserControl11;
    这条在VB上就行不通了,郁闷,同样的这个问题,我把它写入HTML中就可以的
      

  3.   

    1:protected WebUserControl1 WebUserControl11;  如果你的用户控件和页面在同一级目录时可以,如果没在同一级目录你还要考虑一下目录级别 的问题,比如 protected WJ.UserControl.ProductClass ProductClass1;