Exemplo n.º 1
0
    protected void submit_Click(object sender, EventArgs e)
    {
        if (password.Text == cpassword.Text)
        {
            clsregister        obj    = new clsregister();
            clsregistrationprp objprp = new clsregistrationprp();
            objprp.regid    = Convert.ToInt32(Session["cod"]);
            objprp.password = password.Text;
            objprp.lastupd  = Convert.ToString(Session["cod"]) + "||" + "Student " + "||" + firstname.Text + "-" + lastname.Text + Convert.ToString(DateTime.Now);

            try
            {
                success.Visible = true;
                obj.change_pass(objprp);
                success.Text = "Password Successfully Changed ";
            }
            catch (Exception exp)
            {
                success.Visible = true;

                success.Text = exp + "ERROR!!!";
            }
        }

        else
        {
            success.Visible = true;
            success.Text    = "Password Does Not Match";
        }
    }