零度空间

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
//获得父页面
         Page p = this.Parent.Page;
        Type pageType
= p.GetType();
       
//父页面的方法名
         MethodInfo mi = pageType.GetMethod("Loading");
       
//执行
         mi.Invoke(p, new object[] { "参数1","参数2" });
用户控件与用户控件之间调用:

        //获得父页面
         Page p = this.Parent.Page;
        
//获得父页面的子控件
         UserControl uc = p.FindControl("tj_ReceiptList2") as UserControl;
         Type pageType
= uc.GetType();
        
//父类方法名
         MethodInfo mi = pageType.GetMethod("Loading");
        
//参数
         mi.Invoke(uc, new object[] { "参数1", "参数2" });
posted on 2008-07-25 11:51  Diago  阅读(278)  评论(0编辑  收藏  举报