I'm trying to create a login system that checks the username and passsword from an sql database.
I've created a local server named coffee that has a table named 'users' - I have created fields for username & password.
I'm using ASP.NET web application and I want to connect to my SQL database 'coffee' and check that if username / password typed into textboxes is the same as database then redirect to new page.
I've tried looking at a few tutorials but its confusing the hell out of me.
I've tried creating my connection string to the database.
protected void Page_Load(object sender, EventArgs e)
{
string connectionstring = @"Data Source=localhost\sqlexpress;Initial Catalog=coffee;Integrated Security=True;Pooling=False";
SqlConnection connection = new SqlConnection(connectionstring);
connection.Open();
}
However once submit button is clicked it needs to check the user input against the database. Any help i'd be extremely grateful.