knight1001
Technical User
I'm lost about my event arguments and objects.
I'm not sure whether the object should be a sender, and i'm really not sure about how i get my members page to load for this login page if the username and password are right.
I'm such an asp newb
I'm not sure whether the object should be a sender, and i'm really not sure about how i get my members page to load for this login page if the username and password are right.
I'm such an asp newb
Code:
private void Login(object sender, EventArgs e)
{
ButtonLogin.Click += new EventHandler(this.Verify);
connectionpartthree = new OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" + Server.MapPath(".") + "\\F1.mdb;");
if (!(IsPostBack))
{
commandpartthree = new OleDbCommand("SELECT [Username] FROM [Users] WHERE [Username]='" & Request.Form("Username") & "'");
commandpartthree.Connection = connectionpartthree;
connectionpartthree.Open();
if (isnull)
{
then
LabelStatus.Text = "Buggered";
}
else
{
commandpartthree = new OleDbCommand("SELECT [Password] FROM Users WHERE [Password]= '" & Request.Form("Password") &"'");
commandpartthree.Connection = connectionpartthree;
}
connectionpartthree.Close();
end if
end if
}
}
}
private void Verify()
{
Response.Redirect(\\members.asp)
}