3种方式遍历Repeater中的CheckBox全选
来源:互联网 发布:mac状态栏图标隐藏 编辑:程序博客网 时间:2024/05/20 05:27
方式1:
foreach (Control c in this.Repeater1.Controls)
{
HtmlInputCheckBox check = (HtmlInputCheckBox)c.FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
{
HtmlInputCheckBox check = (HtmlInputCheckBox)c.FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
方式2:
for (int i=0;i<this.Repeater1.Items.Count;i++)
{
HtmlInputCheckBox check = (HtmlInputCheckBox)this.Repeater1.Items[i].FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
{
HtmlInputCheckBox check = (HtmlInputCheckBox)this.Repeater1.Items[i].FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
方式3:
foreach( RepeaterItem item in this.Repeater1.Items )
{
HtmlInputCheckBox check = (HtmlInputCheckBox)item.FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
{
HtmlInputCheckBox check = (HtmlInputCheckBox)item.FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
- 3种方式遍历repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox并全选
- 3种方式遍历Repeater中的CheckBox并全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历Repeater中的CheckBox全选
- 3种方式遍历repeater中的控件,可作为CheckBox全选
- 遍历repeater中的CheckBox全选
- Repeater/CheckBox 全选问题
- Repeater中CheckBox全选
- 遍历 repeater中的控件的方式
- Repeater控件中实现checkbox的全选
- Repeater控件中实现checkbox的全选
- checkbox嵌套在repeater,gridview中的全选/反选(方法总结)
- [转]谈谈我对攻读计算机研究生的看法
- 《给初学者的Windows Vista的补遗手册》之025
- 读古龙的岁月(一)
- 《给初学者的Windows Vista的补遗手册》之026
- 《给初学者的Windows Vista的补遗手册》之027
- 3种方式遍历Repeater中的CheckBox全选
- 一个使用iframe引入指定页面的指定区域并设置框架透明的例子
- 《给初学者的Windows Vista的补遗手册》之028
- 《给初学者的Windows Vista的补遗手册》之029
- 心血来潮,写了个走迷宫的程序
- 《给初学者的Windows Vista的补遗手册》之030
- genexus中用procedure写数据到表时用事务处理处理
- 《给初学者的Windows Vista的补遗手册》之031
- 五种常见的PHP设计模式