问个扩展Repeater的模板问题
在扩张Repeater的过程中
- C# code
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); }}请问,我在Pager.ascx里面,怎么样才可以通过<%# Container.....%>这样来获取Repeater的一些信息呢
[解决办法]
最简单,
ascx可以获取request值