0

Hi all

I'm having trouble with some of the login controls for my website. I've successfully set it up so when a user registers it enters the details into an Access database.

I'm now trying to get the login to work but can't see how to implement this.

I've had a go at some code but I'm not sure what I need to add to it to get it working

Here's My code

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;

public partial class Home : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        
        OleDbConnection a = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=I:/skylimos/App_Data/limohire.mdb");
        string dbcommand = "SELECT * FROM customer_TBL WHERE [email] = '" + TextBox1.Text + "' AND [password] = '" + TextBox2.Text + "'";
        OleDbDataAdapter b = new OleDbDataAdapter(dbcommand, a); DataSet dset = new DataSet();
        b.Fill(dset);

        Response.Redirect("Register.aspx");
        
    }
}

Any help is appreciated, cheers

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by woolm110
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.