protected void SummitDepartment_Click(object sender, EventArgs e) { foreach (GridViewRow myrow in GridView3.Rows) { CheckBox cb = (CheckBox)myrow.Cells[0].FindControl("CheckBox1"); if (cb.Checked) { if (Label27.Text == "未选择") { Label27.Text = myrow.Cells[2].Text; UpdatePanel3.Update(); } else { Label27.Text += "," + myrow.Cells[2].Text; UpdatePanel3.Update(); } if (depid.Text == "depid") { depid.Text = myrow.Cells[1].Text; UpdatePanel3.Update(); } else { depid.Text += "," + myrow.Cells[1].Text; UpdatePanel3.Update(); } } GridView3.Dispose(); Panel6.Visible = false; } }
protected void resetchoose_Click(object sender, EventArgs e) { Label27.Text = "未选择"; depid.Text = "depid"; GridView3.Dispose(); UpdatePanel6.Update(); UpdatePanel3.Update(); }