protected void ImageButton1_Click(object sender, ImageClickEventArgs e) { //Response.Write("<script>alert('3');</script>"); bool LoginResult; LoginData seesionData = new LoginData(); LoginResult = seesionData.CheckByUserID(TextBox1.Text, TextBox2.Text); //Session["UserID"] = TextBox1.Text; //Response.Write("<script>alert('1');</script>"); if (LoginResult) { //Response.Write("<script>alert('2');</script>"); Response.Redirect("kilnB.aspx"); Response.Flush(); Response.End(); } if (LoginResult==false) { //Response.Redirect("kilnB.aspx"); Response.Write("<script>alert('谨防盗链,谢谢合作!');</script>"); //Response.Write(Url); Response.Write("<script language='javascript'>window.close();</script>"); Response.Redirect("LoginTest.aspx"); Response.Flush(); Response.End(); } //Session["Role"] = TextBox2.Text; //Data.CheckByUserID(TextBox1.Text); //if (seesionData.Login_Region.Capacity > 0) //{ // for (int i = 0; i < seesionData.Login_Region.Count; i++) // { // Session["Region"] = Session["Region"] + seesionData.Login_Region[i].ToString().Trim() + ":"; // } //} //else //{ // Response.Redirect("LoginTest3.aspx"); //} //if (seesionData.Attribute.Capacity > 0) //{ // for (int i = 0; i < seesionData.Attribute.Count; i++) // { // Session["Attribute"] = Session["Attribute"] + seesionData.Attribute[i].ToString().Trim() + ":"; // } //} //else //{ // Response.Redirect("LoginTest3.aspx"); //} //Response.Redirect("OutLine_Anhui.aspx"); }