I am trying to check the Access database for the Username and Password. This is the connection to the database. Then I am trying to check the database. How do I get the if statement to check the Username and Password from the database?
Thanks for any help.
<asp:AccessDataSource ID="AccessDataSource2" runat="server"
DataFile="~/App_Data/db.mdb"
SelectCommand="SELECT [Username], [Password]
FROM [Admins]">
</asp:AccessDataSource>
protected void Button1_Click(object sender, EventArgs e)
{
if (username.Text == Username && password.Text == "Password")
{
Response.Redirect("admin.aspx");
}
Thanks for any help.
<asp:AccessDataSource ID="AccessDataSource2" runat="server"
DataFile="~/App_Data/db.mdb"
SelectCommand="SELECT [Username], [Password]
FROM [Admins]">
</asp:AccessDataSource>
protected void Button1_Click(object sender, EventArgs e)
{
if (username.Text == Username && password.Text == "Password")
{
Response.Redirect("admin.aspx");
}