无为清净楼资源网 Design By www.qnjia.com
1、
foreach (Control c in this.rptTables.Controls)
{
    CheckBox cbx = (CheckBox)c.FindControl("cbxId");
    TextBox tbx = (TextBox)c.FindControl("tbxTableName");
    if (cbx != null)
    {
        if (cbx.Checked == true)
        { 
            common.salert(tbx.Text);
        }

    }
}

2、
for (int i = 0; i < this.rptTables.Items.Count; i++)
{
    CheckBox cbx = (CheckBox)rptTables.Items[i].FindControl("cbxId");
    TextBox tbx = (TextBox)rptTables.Items[i].FindControl("tbxTableName");
    if (cbx != null)
    {
            if (cbx.Checked)
            {
                common.salert(tbx.Text);
            }

    }
}
关键点:在每行再写个隐藏的控件我是用TextBox,代码如下:
<asp:TextBox id="tbxTableName" runat="server" Text='<%#Eval("TABLE_NAME") %>' style="display:none;" />
标签:
asp.net,Repeater,CheckBox

无为清净楼资源网 Design By www.qnjia.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
无为清净楼资源网 Design By www.qnjia.com