日期:2014-05-17 浏览次数:20438 次
public class RepeaterEx:Repeater { [PersistenceMode(PersistenceMode.InnerProperty), TemplateContainer(typeof(TemplateControl))] public ITemplate PagerTemplate{get;set} protected override void OnLoad(EventArgs e) { if (PagerTemplate != null) PagerTemplate.InstantiateIn(this); base.OnLoad(e); } protected override void OnInit(EventArgs e) { this.PagerTemplate = Page.LoadTemplate("~/Pager.ascx"); base.OnInit(e); } }