protected void Button1_Click(object sender, EventArgs e) { string UserName = this.TextBox1.Text; string UseerPwd = this.TextBox2.Text; bool a = userbll.Exists(UserName, UseerPwd); if (a) { Session["user"] = UserName; Response.Redirect("guanli.aspx"); } else { Response.Write("<script language=javascript>alert('请重新输入!')</script>"); } }