日期:2014-05-18 浏览次数:20983 次
//在table的单元格td_1_1中自动创建一个CheckBox:cb1_1_1
Anthem.CheckBox cb1_1_1 = new Anthem.CheckBox();
cb1_1_1.ID = string.Format("cbChoose{0}", dt.Rows[i]["Number"].ToString());
cb1_1_1.AutoUpdateAfterCallBack = true;
cb1_1_1.Checked = false;
td1_1.Controls.Add(cb1_1_1);
[code]
[code=C#]
//在某个按钮点击事件中
Anthem.CheckBox cbChoose = (Anthem.CheckBox)this.FindControl(string.Format("ctl00_ContentPlaceHolder1_cbChoose{0}", dt.Rows[i]["Number"].ToString()));