テーブルuser_infoが作成され、2つのユーザー名とパスワードが含まれています。以下のコードを実行すると、正しいユーザー名とパスワードを入力しても、常に「else」状態になります。
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
string v = System.Configuration.ConfigurationManager.ConnectionStrings["harish"].ConnectionString;
con = new OracleConnection(v);
con.Open();
cmd = new OracleCommand("select * from user_info where username='" + Login1.UserName.Trim() + "' and password='" + Login1.Password + "'", con);
dr = cmd.ExecuteReader();
dr.Read();
if (dr.HasRows)
{
Response.Redirect("Default2.aspx");
}
else
{
Response.Redirect("Default.aspx");
}
con.Close();
dr.Close();
}