hello
i have update password aspx page where i used dropdownlist which shows all the users...and three textboxes which takes old password and new nd confirm passwrd....but problem is it is not updating password....my code is as follows.....
protected void Button1_Click(object sender, EventArgs e)
{
db.myconnection();
try
{
if (TextBox2.Text == TextBox3.Text)
{
db.myconnection();
SqlCommand cmd = new SqlCommand("update login set password='" + TextBox2.Text + "', where username='" + DropDownList1.SelectedItem.Text+ "'", db.sqlcon);
cmd.ExecuteNonQuery();
Label2.Text = "Password Updated Successfully";
}
}
catch (Exception r){
Response.Write("updation failed");
}
}
please help