获取(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); }
时间: 2024-10-12 16:50:43