protected void btLogin_Click(object sender, EventArgs e) { string returnUrl = Request.QueryString["returnUrl"]; if ((UserController.ValidateUser(txtUsername.Text.Trim(), SecurityMethod.MD5Encrypt(txtPassword.Text.Trim())) != null)) { AuthenticateUtility.LoginUser(txtUsername.Text.Trim(), true); AppEnv.SetLanguage("vi-VN"); Response.Redirect("/Authenticate.aspx"); } else { //Response.Write("NULL"); } }
protected void BtLoginClick(object sender, EventArgs e) { string returnurl = ConvertUtility.ToString(Request.QueryString["returnurl"]); if (UserDB.CheckAccount(txtEmail.Text, txtPassword.Text)) { AuthenticateUtility.LoginUser(txtEmail.Text, chkRememberPwd.Checked); if (returnurl != "") { Response.Redirect(returnurl); } else { Response.Redirect(AppEnv.ADMIN_PATH); } } else { lblMessage.Visible = true; } }