Beispiel #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            var cllg = new DlLogins();

            //check passwords is ok first
            if (cllg.Getuser(Session["pusername"].ToString(), TextBox1.Text) != null)
            {
                if (TextBox2.Text == TextBox3.Text)
                {
                    //change pwd
                    cllg.Chgpwdrec(Session["pusername"].ToString(), TextBox2.Text);
                    Label4.Text   = "Password Changed, please use this from now onwards";
                    TextBox1.Text = "";
                    TextBox2.Text = "";
                    TextBox3.Text = "";
                }

                else
                {
                    Label4.Text = "New Password donot match";
                }
            }

            else
            {
                //check pwd
                Label4.Text = "Please Check your old password";
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            var cllg = new DlLogins();

            //check passwords is ok first
            if (cllg.Getuser(Session["pusername"].ToString(), TextBox1.Text) != null)
            {
                if (TextBox2.Text == TextBox3.Text)
                {
                    //change pwd
                    cllg.Chgpwdrec(Session["pusername"].ToString(), TextBox2.Text);
                    Label4.Text = "Password Changed, please use this from now onwards";
                    TextBox1.Text = "";
                    TextBox2.Text = "";
                    TextBox3.Text = "";
                }

                else
                {
                    Label4.Text = "New Password donot match";
                }
            }

            else
            {
                //check pwd
                Label4.Text = "Please Check your old password";
            }
        }