Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EventArgs and Objects

Status
Not open for further replies.

knight1001

Technical User
Nov 29, 2004
14
0
0
GB
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

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)
  }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top