protected void login_Click(object sender, EventArgs e) { Login1 log = new Login1(); bool loginresult = log.GetLogin(inpemail.Value, inppassword.Value); if (loginresult) { Session["Email"] = inpemail.Value; Response.Redirect("Home.aspx"); } else { Response.Write("Invalid e-mail or password"); } }