惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
量子位
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
Google DeepMind News
Google DeepMind News
小众软件
小众软件
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
MongoDB | Blog
MongoDB | Blog
B
Blog RSS Feed
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
博客园 - 聂微东
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Microsoft Security Blog
Microsoft Security Blog
雷峰网
雷峰网
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell

博客园 - Jeff.Yang

关于Cache 不同数据库系统NULL判断的一点细节 关于 SQL CLR 几点细节 SkipLinkText会惹祸 - Jeff.Yang - 博客园 关于TextBox的ReadOnly - Jeff.Yang - 博客园 控件存在检测 SQL Server 2000与IIS6 ASP.NET Profile之惑 ASP.NET 2.0的URL摘取 VS2005和.NET 2.0真搞 MySQL远程管理 SQL Server 异机迁移 Oracle时间处理 命名颜色可能不唯一 SQL Server 2005 版本号 IE默认设置 Safe360 BUG TP-Link TL-WN620G无线网卡的WPA2协议支持 MySQL 数据迁移
Repeater中FooterTemplate中的控件提取
Jeff.Yang · 2007-07-23 · via 博客园 - Jeff.Yang

ASP.NET 2.0,Repeater中FooterTemplate并无FindControl方法,也无法将FooterTemplate转成RepeaterItem,虽然在Repeater的ItemDataBound事件中,RepeaterItemEventArgs参数用if (e.Item.ItemType == ListItemType.Footer)可判别出这个Footer,但其他时候不行。

目前找到的方法如下:
CheckBoxList SampleCheckBoxList = FooRepeater.Controls[FooRepeater.Controls.Count - 1].FindControl("SampleCheckBoxList ") as CheckBoxList;

我在FooterTemplate放了一个CheckBoxList。

也就是说FooterTemplate是Repeater控件中的最后一个控件。

posted on 2007-07-23 20:31  Jeff.Yang  阅读(1414)  评论(2)    收藏  举报