This code validates that the user is created in the database. if its not, it kicks the user out. It works properly except that the message explaining to the user what has happened is not showing up.
Can anyone help me with this please?
protected void OnLoggingIn(object sender, LoginCancelEventArgs e) { string sSQL = "SELECT employeeid from employees where EmployeeID = @EmployeeID"; DataTable valUser = new DataTable(); TextBox employeeid = (TextBox)LoginUser.FindControl("UserName"); dbAccess.GetUserInfo(sSQL, employeeid.Text, ref valUser); if (valUser.Rows.Count == 0) { LoginUser.FailureText = "TEMP MESSAGE-- Your not in the PTO system"; e.Cancel = true; } }
I want the message to show up in a mesage box. I'm using C#.