Example #1
0
        protected void btnChangePassword_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                if (ChangePassword())
                {
                    lblMessage.ForeColor      = System.Drawing.Color.Black;
                    lblMessage.Text           = "<b> Password successfully changed </b> , Click <a href='Welcome.aspx'> Here </a>" + " to goto welcome screen";
                    btnChangePassword.Visible = false;
                }
                else
                {
                    lblMessage.ForeColor = System.Drawing.Color.Red;
                    lblMessage.Text      = "Invalid Current Password...";
                }

                DBClass.CloseConnection();
            }
        }
 protected void Session_End(object sender, EventArgs e)
 {
     DBClass.CloseConnection();
 }