How could I make a code that when I click a button on asp.net, an alert message of bootstrap or message box appears?
protected void ButtonLogin_Click(object sender, EventArgs e)
{
//TextBoxEmail.Text = DateTime.Now.ToString();
string UserName = TextBoxEmail.Text.Trim();
string password = TextBoxPassword.Text.Trim();
OracleConnection conn = new OracleConnection(strConnString);
conn.Open();
sql = "select password from userlogin where USERNAME = '" + UserName + "' and password ='" + password + "' ";
cmd = new OracleCommand(sql, conn);
// orada=new OracleDataAdapter(com.CommandText,conn);
// cmd.CommandType = CommandType.Text;
dr = cmd.ExecuteReader();
//dr.Read();
if (dr.HasRows)
{
Label1.Text = "";
Response.Redirect("Details.aspx");
}
else
{
Label1.Text = "No data found...";
conn.Close();
}
}
}
Above, in the else portion:
else
{
Label1.Text = "No data found...";
conn.Close();
}
When username and password don't match, I want a bootstrap alert or message box to appear on the website: "password is not correct". How could I do that?