Example #1
0
        protected void CreateUser_Click(object sender, EventArgs e)
        {
            DBAcme DB              = (DBAcme)Session["DB"];
            string StudentID       = studentID.Text;
            string StudentName     = studentname.Text;
            string password        = Password.Text;
            string confirmPassword = ConfirmPassword.Text;
            string email           = Email.Text;
            string phone           = Phone.Text;
            int    numrow          = DB.InsertStudent(StudentID, StudentName, email, password, confirmPassword, phone);

            showMessage.Text = "Student added successfully!";
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            DBAcme DB          = (DBAcme)Session["DB"];
            string name        = fullName.Text;
            string pass        = password.Text;
            string conPassword = confirmPassword.Text;
            string mail        = email.Text;
            string Phone       = phone.Text;
            string studentID   = studentid.Text;
            int    numrow      = DB.InsertStudent(studentID, name, mail, pass, conPassword, Phone);

            Response.Redirect("/Account/Login");
            Session["reg"] = "Registered";
        }