protected void btnDel_Click(object sender, EventArgs e) { string result = string.Empty; for (int i = 0; i <= grd.Rows.Count - 1; i++) { CheckBox cbx = (CheckBox)grd.Rows[i].FindControl("cbx"); if (cbx.Checked == true) { result = Configpara.Delete(grd.Rows[i].Cells[1].Text, grd.Rows[i].Cells[2].Text); if (result != "success") { JScript.Alert("删除参数失败!", this); } } } if (result == "success") { JScript.Alert("参数已成功删除!", this); databind(); } }