protected void DLmodifyb_ItemCommand(object source, DataListCommandEventArgs e) { if (e.CommandName == "btremoveb_command") { if (Session["handexam"] != null) { exam1 = (Exam)Session["handexam"]; } exam1.removeB(Convert.ToInt32(e.CommandArgument)); Session["handexam"] = exam1; DLmodifyb.DataBind(); } }
protected void WSmodify_activate(object sender, EventArgs e) { if (Session["handexam"] != null) { exam1 = (Exam)Session["handexam"]; } if (exam1.aCount > 0) { DLmodifya.DataBind(); } else { DLmodifya.Visible = false; } if (exam1.bCount > 0) { DLmodifyb.DataBind(); } else { DLmodifyb.Visible = false; } }