读书人

问个扩展Repeater的模板有关问题

发布时间: 2012-05-15 14:35:29 作者: rapoo

问个扩展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值

读书人网 >asp.net

热点推荐