protected void btnAllDelete_Click(object sender, EventArgs e)
{
for (int i=0; i < rptStudent.Items.Count; i++)//表示项目总数
{
CheckBox cbx = (CheckBox)rptStudent.Items[i].FindControl("cbxChild");
if (cbx.Checked == true)
{
int stuId = Convert.ToInt32(((HiddenField)rptStudent.Items[i].FindControl("hfStuID")).Value);
int flag = sqlserver.linkSql("DELETE FROM studyInfo WHERE stuid='" + stuId + "'");
}
}
Response.Write("共删除"+rptStudent.Items.Count+"条数据");
Initstudent();
}
}