It's very easy to login with your database in application. Here, you can see the login process.
protected void btnLogin_Click(object sender, EventArgs e)
{
SqlConnection cnn = new SqlConnection("Add your connection String here.");
SqlDataAdapter da = new SqlDataAdapter("Select * from tblRegistration where username= '" + txtusername.Text + "' and password = '" + txtpassword.Text + "'",cnn);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count != 0)
{
Session["username"] = ds.Tables[0].Rows[0][0].ToString();
Response.Redirect("Home.aspx");
}
}
I hope this example is helping to you........!!!!!!