3种方式遍历Repeater中的CheckBox并全选
来源:互联网 发布:蔡澜新书红颜知已 编辑:程序博客网 时间:2024/06/05 12:41
方式1:
foreach (Control c in this.Repeater1.Controls)
{
HtmlInputCheckBox check = (HtmlInputCheckBox)c.FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
方式2:{
HtmlInputCheckBox check = (HtmlInputCheckBox)c.FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
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;
}
}
方式3:{
HtmlInputCheckBox check = (HtmlInputCheckBox)this.Repeater1.Items[i].FindControl("chkSelect");
if( check != null )
{
check.Checked = true;
}
}
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中的全选/反选(方法总结)
- ASP.NET中生成条形码
- C#检测含有中文字符串的实际长度
- 查看远程端口开放状态
- 在ASP.NET中使用SmtpClient发送邮件
- NXTLOG回到学校建造挑战赛
- 3种方式遍历Repeater中的CheckBox并全选
- C#的usb通讯编程
- IIS站点管理类
- 用ftpsupport进行ftp上传
- extern用法
- C# 调用API,实现注销远程登录本机的用户
- IIS虚拟目录控制类
- 日本語の财务专用术语
- 实现同时只允许运行一个程序实例