在用户控件中调用父窗体的某个方法

来源:互联网 发布:iphone更新后数据丢失 编辑:程序博客网 时间:2024/05/01 20:22

  #region 设置分页
    /// <summary>
    /// 设置分页
    /// </summary>
    /// <param name="curPage">当前页</param>
    protected void SetPage(int curPage)
    {
        System.Web.UI.Page ObjPage = this.Page;
        Type ObjType = ObjPage.GetType();
        MethodInfo ObjMi = ObjType.GetMethod(“父窗体中的一个方法”);
        ObjMi.Invoke(ObjPage, new object[] { curPage });

    }
    #endregion 设置分页

 

原创粉丝点击