protected void loginButton_Click(object sender, EventArgs e) { DAL.DAO.Center centerInfo = new DAL.DAO.Center(); if (aCenterManager.CenterInfoCheck(codeTextBox.Text, passwordTextBox.Text, out centerInfo)) { Session["CenterInfoDetails"] = centerInfo; FormsAuthentication.RedirectFromLoginPage(codeTextBox.Text, true); } else { labelAuthentication.Text = "Invalid User Name and password"; } }