Posted on: 3/24/2014 10:06:29 PM | Views : 383

Here's my code for the registration page.  This isn't all of it.
protected void Button1_Click(object sender, EventArgs e) { SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["QSTARConnectionString"].ConnectionString); con.Open(); string insCmd = "INSERT INTO Staff(UserID, StaffFirstName, StaffSurname, StaffPassword, StaffEmailAddress, AccessLevel) values (@UserID, @StaffFirstName, @StaffSurname, @StaffPassword, @StaffEmailAddress, @AccessLevel)"; SqlCommand insertUser = new SqlCommand(insCmd, con); insertUser.Parameters.AddWithValue("@UserID", TextBox1.Text); insertUser.Parameters.AddWithValue("@StaffFirstName", TextBox5.Text); insertUser.Parameters.AddWithValue("@StaffSurname", TextBox6.Text); insertUser.Parameters.AddWithValue("@StaffPassword", Crypto.HashPassword(TextBox2.Text)); ...

Go to the complete details ...