protected void BtnLogin_Click(object sender, EventArgs e) { string email = String.Format("{0}", Request.Form["email"]); string password = String.Format("{0}", Request.Form["password"]); if (proxy.CheckUser(email, password)) { this.user = proxy.GetUserByEmail(email); proxy.Login(this.user.ID); Response.Redirect("ProfilePage.aspx?id=" + this.user.ID.ToString()); } loginError.Visible = true; }