Good day all
I have a register website where in the forgot password section, i want the user to enter there email address then it will display their password.
This is my code:
SqlCommand comd = new SqlCommand("select Password from Login where [E-Mail] = tiaans@gmail.com", sqlconn);
SqlDataAdapter da = new SqlDataAdapter(comd);
da.Fill(dt);
if (dt.Rows.Count > 0)
{
try
{
string result = dt.Rows[0]["Password"].ToString().Trim();
Response.Write(result);
}
catch (SqlException p)
{
Response.Write(p.ToString());
}
}
But i get an error :
The multi-part identifier "tiaans@gmail.com" could not be bound.
I inserted the email to test.