Hi,
In the registration form am abt to make, i want the system to generate the password for the user. The simple way to enter the data to the backend is :
SqlCommand cmd_insertuserDetail = new SqlCommand ("Insert into fwm_user (last_name, first_name, birth_date, address, city, postal_code, country, email, password, telephone, occupation, company)" +
" values (@last_name, @first_name, @birth_date, @address, @city, @postal_code, @country, @email, @password, @telephone, @occupation, @company)", conn1);
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@last_name", txtLName.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@first_name", txtFName.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@birth_date", txtBirthdate.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@address", txtAddress.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@city", txtCity.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@postal_code", txtPostalCode.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@country", txtCountry.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@email", txtEmail.Text));
//if (ValidateEmailAddress(txtEmail.Text))
//{
// cmd_insertuserDetail.Parameters.Add(new SqlParameter("@email", txtEmail.Text));
//}
//else
//{
// MessageBox.Show("Enter valid Email ID", "Error!!", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
//}
???????????
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@telephone", txtTelephone.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@occupation", txtOccupation.Text));
cmd_insertuserDetail.Parameters.Add(new SqlParameter("@company", txtCompany.Text));
password needs to be generated when user clicks on "submit" button.. what r the ways to generate a password... pls guide with both source code any any SQL procedures as required
Thanks