hi
i have coded for forget password module but getting an error that is attached with... dont know why its hapen....here is code
string strCon = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
SqlConnection objcon = new SqlConnection(strCon);
objcon.Open();
string str1 = "'"+txt_EmpFP_Uname.Text+"'";
string str2 = "'" + txt_EmpFP_OldPass.Text + "'";
String query = "Select * from EmpReg where UName="+ str1+ " and Pass =" + str2;
SqlDataAdapter adp = new SqlDataAdapter(query, objcon);
DataSet ds = new DataSet();
adp.Fill(ds, "EmpReg");
if (ds.Tables[0].Rows.Count > 0) {
SqlCommandBuilder builder = new SqlCommandBuilder(adp);
adp.UpdateCommand = builder.GetUpdateCommand();
ds.Tables[0].Rows[0]["Pass"] = txt_EmpFP_NPass.Text;
adp.Update(ds.Tables[0]);
objcon.Close();
Response.Redirect("EmpLogin.aspx");
}
else
{
lbl_EmpForPass.Text = "Employee doesnot exist!!!";
}
}