hai.. i want to ask about the correct way to update the password in asp.net c#
UpdateCmd.CommandText = @"UPDATE staffHR SET password = EncryptByPassPhrase(@password, convert(varbinary,password)) WHERE username = @username";
UpdateCmd.Connection = con;
string pwd = TextBox1.Text;
System.Text.ASCIIEncoding encryptpwd = new System.Text.ASCIIEncoding();
byte[] bpwdArray = encryptpwd.GetBytes(pwd);
UpdateCmd.Parameters.AddWithValue("@username", Label1.Text);
UpdateCmd.Parameters.AddWithValue("@password", bpwdArray);
UpdateCmd.ExecuteNonQuery();
UpdateCmd.Dispose();
con.Close();
this code not update the column, but not have any error.. anyone help me plizz
Self-Innovator, if this helps please login to Mark As Answer. | Alert Moderator