protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { string username = Request["username"]; string password = Request["password"]; BLL.Admin adminbll = new BLL.Admin(); if (adminbll.login(username,password)==true) { Response.Redirect("index.aspx"); Session["username"] = username; Session["password"] = password; } if (adminbll.login(username, password)==false) { Response.Write("<script>alert('用户名或者密码有错!')</script>"); } }
protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { string username = Request["username"]; string password = Request["password"]; BLL.Admin adminbll = new BLL.Admin(); if (adminbll.login(username, password) == true) { Response.Redirect("index.aspx"); Session["username"] = username; Session["password"] = password; } if (adminbll.login(username, password) == false) { Response.Write("<script>alert('用户名或者密码有错!')</script>"); } }