搬运随笔三

获取(Repeater)复选框选中的id

private string getParam()
        {
            string param = "";
            foreach (RepeaterItem item in repInfo.Items)
            {
                HiddenField hidID = (HiddenField)item.FindControl("hidID");
                System.Web.UI.HtmlControls.HtmlInputCheckBox cb_sel = (System.Web.UI.HtmlControls.HtmlInputCheckBox)item.FindControl("cb_sel");
                if (cb_sel.Checked)
                {
                    param += cb_sel.Value + ",";
                }
            }
            return param.Substring(0, param.Length - 1);
        }

  

posted @ 2016-02-29 11:02  小爆脾气  阅读(145)  评论(0编辑  收藏  举报