protected void b_Click(object sender, EventArgs e) { AppUser appUserObj = new AppUser(); appUserObj.username = usernameTb.Text; appUserObj.pwd = passwordTb.Text; String pwdConfirm = ConfirmPwdTb.Text; Boolean isError = false; if (!appUserObj.pwd.Equals(pwdConfirm)) { confirmPwdError.Text = "Confirm Password did not match."; isError = true; } if (isError) { return; } AppDao daoObj = new AppDao(); daoObj.updatedPassword(appUserObj); Session["FIRST_LOGIN"] = false; Response.Redirect("PageRedirection.aspx"); }