override protected void OnInit(EventArgs e)
{
CheckBoxList myBox=new CheckBoxList();
myBox.ID="myBox";
myBox.Items.Add("000");
myBox.Items.Add("001");
myBox.Items.Add("002");
TD1.Controls.Add(myBox);
InitializeComponent();
base.OnInit(e);
}
//在OnInit事件中添加CheckBoxList控件(CheckBoxList)TD1.Controls[0].Controls[0].FindControl("myBox")//生成的CheckbBoxList实例。
例如你的其它事件中通过这条语句可以判断第一项是否被选择
((CheckBoxList)TD1.Controls[0].Controls[0].FindControl("myBox")).Items[0].Selected
//注:TD1是运行在服务器端的单元格