【转载】获取Repeater中Footer/HeaderTemplate 中的控件
正文
通常我们可以在ItemCreated或者ItemDataBound事件中获取模板列中的控件,那如何在非列表控件本身事件外获取呢?
Repeater:
foreach (RepeaterItem item in rptEnquiries.Controls)
{
if (item.ItemType == ListItemType.Footer)
{
item.FindControl("btnSend1").Visible = true;
break;
}
}
DataList:

DataGrid:
引用地址:http://www.gogosonny.net/suibi/gogosonny/2006/10/16/227.aspx
作者 GoGoSonny | 添加 2006-10-16 19:33 | 回复总数 0| 所属类别 代码文章


在下面输入您的回复:
1.请不要夹带某些非水产的关键字。
2.回复内容字符数不要超过600。
3.验证码字母不区分大小写。
4.审核后回复的内容才会被显示。
5.点击图片可更换验证码。