/// <summary> /// 删除用户 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void BtnDeleteBook_Click(object sender, EventArgs e) { int id = Convert.ToInt32(BookId.Text); //实例化一个accountDao AccountDao accountDao = new AccountDao(); //调用删除方法删除用户 if (accountDao.DeleteAccountById(id)) { // 刷新当前页 0为立即刷新 Response.AddHeader("Refresh", "0"); } }