protected void OnButtonAdd(object sender, EventArgs e) { if (transfer.AddStudent(TextStudentID.Text.ToString(), TextStudentName.Text.ToString(), TextStudentPassWord.Text.ToString(), TextStudentSex.Text.ToString(), TextStudentAge.Text.ToString(), TextStudentMajor.Text.ToString(), TextStudentClass.Text.ToString(), TextStudenttAllScoreRequire.Text.ToString())) { Response.Write("<script language=javascript>alert('添加学生成功!')</script>"); TextStudentID.Text = ""; TextStudentName.Text = ""; TextStudentPassWord.Text = ""; TextConfirmPassWord.Text = ""; TextStudentSex.Text = ""; TextStudentAge.Text = ""; TextStudentMajor.Text = ""; TextStudentClass.Text = ""; TextStudenttAllScoreRequire.Text = ""; } else { Response.Write("<script language=javascript>alert('添加学生失败,请检查后重试!')</script>"); } }