编辑控件 public abstract partial class TEditorBase <TEntity, TRepository, TSqlStrConstruct> : UserControl where TEntity:Yom.Extend.Entity.EntityBase where TRepository : Yom.Extend.Repository.RepositoryBaseRepository<TEntity, TSqlStrConstruct> wher
using System.Reflection; MethodInfo mi = this.Page.GetType().GetMethod("GetUserName"); //该处的GetUserName是父页面里的方法名称 ; return mi.Invoke(p, new object[] {userId}).ToString(); //userId指的指的是GetUserName所要传递的参数.
public abstract partial class TListPager<TEntity, TRepository, TSqlStrConstruct> : UserControl where TEntity:Yom.Extend.Entity.EntityBase where TRepository : Yom.Extend.Repository.RepositoryBaseRepository<TEntity, TSqlStrConstruct> where TSqlS
动态添加多个相同用户控件,并使每个用户控件获取不同的内容. 用户控件代码: 代码WebControls using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace xuyuanwang.myControl { public partial class Lable