private void btnSignIn_Click(object sender, EventArgs e) { //try to sign in and record any errors string Error = mSec.SignIn(txtEMail.Text, txtPassword.Text); //if there were no errors if (Error == "") { //close this form this.Close(); } else { //otherwise show any errors lblError.Text = Error; } }
protected void btnSignIn_Click(object sender, EventArgs e) { //try to Sign In and record any errors String Error = Sec.SignIn(txtEmail.Text, txtPassword.Text); //if there were no errors if (Error == "") { //navigate to the re-send page Response.Redirect("Default.aspx"); } else { //otherwise display any error lblError.Text = Error; } }
protected void btnSignIn_Click(object sender, EventArgs e) { //try to sign in and record any errors String Error = Sec.SignIn(txtEMail.Text, txtPassword.Text); //if there were no errors if (Error == "") { //redirect to the main page Response.Redirect("MainMenu.aspx"); } else { //otherwise display any errors lblError.Text = Error; } }
protected void btnloginStaff_Click(object sender, EventArgs e) { //create an instance of the class clsSecurity Sec = new clsSecurity(); //var to store the data entered string Username = txtUsername.Text; string Password = txtPassword.Text; //var to store the error and function lblError.Text = Sec.SignIn(txtUsername.Text, txtPassword.Text); //if there is no error if (lblError.Text == "") { //go to my customer account page Response.Redirect("MyStaffAccount.aspx"); } else { //show the error lblError.Text = lblError.Text; } }