0

Hi ,
I am working on a web Application..i have a Login Page..I have a problem with the password authentication..the password does not accept "space" in between the password characters but it does not validate the "space" given after the last character of the Password..it does not say invalid login if the space is given after the last character..it redirects me to the next page..i could not fix this issue..please help me with the same
Regards
VASUDHA

2
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by Fungus1487
0
ds = new DataSet();

da = new SqlDataAdapter("select * from login3 where name='" + TextBox1.Text + "' and pwd='" + TextBox2.Text + "' and role='" + DropDownList1.Text + "'", cn);
da.Fill(ds, "login3");
dt = ds.Tables["login3"];

if (dt.Rows.Count != 0 && DropDownList1.Text == "admin")
{
     Response.Redirect("page2.aspx");
      TextBox2.Text = null;
}

This is the code..
Thanks & Regards
Vasudha

0

strange. i thought the request would fail as you are asking it to exactly match the request.

can you Response.write(sql) the SQL statement to the screen to see exactly what is returned from the text boxes?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.