protected void Button1_Click(object sender, EventArgs e) { string user = TextBox1.Text; string pass = TextBox2.Text; account a = new account(); int res = a.login(user, pass); if (res == 1) { Session["username"] = user; Server.Transfer("upload.aspx"); } else { Label3.Visible = true; } }