I have used this code but its not working..
if anyone knows please help me in doing this
protected void change_password_btn_Click(object sender, EventArgs e)
{
string old_pwd, new_pwd, comfirm_pwd;
old_pwd = old_txt.Text.ToString();
new_pwd = new_txt.Text.ToString();
comfirm_pwd = confirm_txt.Text.ToString();
using (SqlConnection con = con_manager.getcon())
{
string sql = "select * from login where password='" + old_pwd + "'";
SqlCommand command = new SqlCommand(sql, con);
command.CommandType = CommandType.Text;
SqlDataReader dr;
dr = command.ExecuteReader();
if (dr.Read())
{
string sql1 = "update login,user_register set login.password='"+new_pwd+"',user_register.password='"+new_pwd+"' where login.reg_id=user_register.row_id";
this.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('password change sucessfull'); window.location.href = 'ChangePassword.aspx';", true);
}
}