绑定复选框
for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
{
this.CheckBoxListVisitTime.SelectedValue = ds1.Tables[0].Rows[i][ "VisitTimeTypeID "].ToString();
}
有3条记录怎么只选种了最后一条
------解决方案--------------------for (int i = 0; i < ds1.Tables[0].Rows.Count; i++)
{
if(CheckBoxList2.Items.FindByValue(ds1.Tables[0].Rows[i][ "VisitTimeTypeID "].ToString())!=null)
CheckBoxList2.Items.FindByValue(ds1.Tables[0].Rows[i][ "VisitTimeTypeID "].ToStrin()).Selected = true;
}