protected void Button1_Click(object sender, EventArgs e) { string newPassword = TextBox3.Text; string currentPassword = TextBox1.Text; int empId = Convert.ToInt32(Session["empId"].ToString()); if (Session["empPassword"].ToString() != currentPassword) { Label22.Text = "Incorrect Password"; Label22.BackColor = System.Drawing.Color.Red; } else { Common_ChangePasswordBL objChangePasswordBL = new Common_ChangePasswordBL(); objChangePasswordBL.Common_ChangePassword(empId, newPassword); Label22.Text = "Password Updated"; Label22.BackColor = System.Drawing.Color.Yellow; Panel1.Visible = false; LinkButton1.Visible = true; getAccountInfo(); } }