private void cmdRegister(object sender, EventArgs e) { //admin.username = textBox1.Text; //admin.password = textBox2.Text; localhost.Service1 s = new localhost.Service1(); s.Register(textBox1.Text, textBox2.Text); MessageBox.Show("Successfull"); }
protected void btnRegister_Click(object sender, EventArgs e) { string password = rtxtPassword.Value; string rPassword = rtxtRePassword.Value; if (password == rPassword) { lh.Register(rtxtFirstName.Value, rtxtLastName.Value, rtxtEmailAdress.Value, rtxtcontact.Value, rtxtPassword.Value, "C"); Response.Redirect("Login.aspx"); } else { lblErr.Text = "Passwords do not match"; lblErr.Visible = true; } }