日期:2014-05-17 浏览次数:20432 次
foreach (RepeaterItem i in List.Items) { CheckBox cb = (CheckBox)i.FindControl("Select"); HiddenField hd = (HiddenField)i.FindControl("hfCode"); bool matter = cb.Checked; if (matter) { //出现错误 Response.Write(DataBinder.Eval(i.DataItem, "Title").ToString()+"<br/>"); Response.Write(hd.Value + "<br/>"); //这种方式成功 } }