protected void Page_Load(object sender, EventArgs e) { string searchS = Request.QueryString["search"]; if (Request.QueryString["id"] != null) { try { if (acc.checkCommentByUser(int.Parse(Request.QueryString["id"].ToString())) == true) { acc.deleteCommentByUser(int.Parse(Request.QueryString["id"].ToString())); } acc.deleteUser(int.Parse(Request.QueryString["id"].ToString())); Response.Write("<script LANGUAGE='JavaScript'>alert('Xoá thành công !')</script>"); Response.Redirect("Manage.aspx"); } catch (Exception) { Response.Write("<script>alert('Xoá thất bại !')</script>"); } } else if (searchS != null && searchS != "") { Repeater1.DataSource = acc.searchUsers(searchS); Repeater1.DataBind(); } else { Repeater1.DataSource = acc.getUsers(); Repeater1.DataBind(); } }