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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
G
Google Developers Blog
V
V2EX
美团技术团队
H
Help Net Security
月光博客
月光博客
爱范儿
爱范儿
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
U
Unit 42
大猫的无限游戏
大猫的无限游戏
Recent Announcements
Recent Announcements
A
About on SuperTechFans
博客园 - Franky
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
人人都是产品经理
人人都是产品经理
博客园 - 司徒正美
MyScale Blog
MyScale Blog
B
Blog
雷峰网
雷峰网
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
T
The Blog of Author Tim Ferriss

博客园 - 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)    收藏  举报