将checkbox选中Repeater中的某一行ID,赋值给label

        /// <summary>
        /// 将checkbox选中的行的ID,赋值给label
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Tree_SelectedNodeChanged(object sender, EventArgs e)
        {
            BindTree();
        }

        protected void Link_edit_Click(object sender, EventArgs e)
        {
            CheckBox ck;
            for (int i = 0; i < this.rpt_oa_txl.Items.Count;i++ )
            {
                ck =(CheckBox)(this.rpt_oa_txl.Items[i].FindControl("checkSelect"));
                Label lbl = (Label)(this.rpt_oa_txl.Items[i].FindControl("lblID"));

                if (ck.Checked)
                {
                    this.Link_edit.Text = lbl.Text;
                }
            }
            int OA_TXL_edit_id = Convert.ToInt32(this.Link_edit.Text);
            Response.Write(OA_TXL_edit_id);
            Response.Redirect("OA_TXL_edit.aspx?type=0&ID="+OA_TXL_edit_id);
        }

    }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值