本帖最后由 zheng3feng 于 2011-05-29 23:37:37 编辑

解决方案 »

  1.   

    参考:
    http://topic.csdn.net/u/20080121/16/f717090d-7000-4e40-9100-6559a5149131_2.html
      

  2.   

    public class YourUserControl2: UserControl
    {
      public void BindData(int abc)
      {
    //绑定你的GridView,如果需要输入,就从参数输入
      }
    }
    public class YourUserControl1: UserControl
    {
      
      public event EventHandler DisplayData;  public int SomeProperty
      {
    get
    {}
      }  public void Button_Click(Object sender, EventArgs e)
      {
    if (DisplayData != null)
    DisplayData(this,EventArgs.Empty);
      }
    }public class YourPage : Page
    {
       
      YourUserControl1 uc1;
      YourUserControl2 uc2;  //.....
      void Page_Load(Object sender, EventArgs e)
      {
      uc2.DisplayData += BindDisplay;
      }  public void BindDisplay(Object sender, EventArgs e)
      {
    uc2.BindData(uc1.SomeProperty);
      }
    }