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");
}
}
US Constitution Article II, Section 1, Paragraph 7
"The President shall, at stated Times, receive for his Services, a Compensation, which shall neither be encreased nor diminished during the Period for which he shall have been elected, and he shall not receive within that Period any other Emolument from the United States, or any of them."
and Article I, Section 9, Paragraph 8
"No Title of Nobility shall be granted by the United States: And no Person holding any Office of Profit or Trust under them, shall, without the Consent of the Congress, accept of any present, Emolument, Office, or Title, of any kind whatever, from any King, Prince, or foreign State."
e·mol·u·ment: a salary, fee, or profit from employment or office.
Just saying.
Question
woolm
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
Link to comment
https://www.neowin.net/forum/topic/854000-login-control-using-c-and-microsoft-access-aspnet/Share on other sites
2 answers to this question
Recommended Posts