public void signUp(AdminRegister a) { Connection gcon = new Connection(); // gcon.getConnection(); gcon.ExecuteQuery("insert into AdminReg values ('" + a.Name + "','" + a.Email + "','" + a.Password + "','" + a.role + "')"); gcon.ExecuteQuery("insert into login values('" + a.Email + "','" + a.Password + "','" + a.role + "')"); }
protected void Button1_Click(object sender, EventArgs e) { Classes.ClearText ct = new Classes.ClearText(); Classes.AdminRegister ad = new Classes.AdminRegister(); ad.Name = TextBox1.Text; ad.Email = TextBox2.Text; ad.Password = TextBox3.Text; ad.signUp(ad); Response.Write("<script>alert('Successfully Registered')</script>"); ct.ClearTextbox(TextBox1, TextBox2, TextBox3); }