OK, I've taken the plunge and started learning ASP.NET (actually, my boss kinda forced me into it with the 'You need to get your MCTS cert by the end of the year' comment).
I've created a web site, but I can't seem to get the loginstatus control to work. Once a user is authenticated, I expected the state of the loginstatus control to update (and thus, display the 'logout' state message to the user) but it doesn't. The control still displays the 'default' state of 'login'.
Any help?
Thanks much.
ps. I catch the Authenticate event for the Login control. Otherwise, I let the Membership API automagically handle the remaining events.
Here is the code
I've created a web site, but I can't seem to get the loginstatus control to work. Once a user is authenticated, I expected the state of the loginstatus control to update (and thus, display the 'logout' state message to the user) but it doesn't. The control still displays the 'default' state of 'login'.
Any help?
Thanks much.
ps. I catch the Authenticate event for the Login control. Otherwise, I let the Membership API automagically handle the remaining events.
Here is the code
Code:
protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (Membership.ValidateUser(Login1.UserName, Login1.Password))
{
Login1.Visible = false;
LoginStatus1.Visible = true;
Login1.FailureText = "";
}
else
{
Login1.FailureText = "Invalid Login Attempt!";
}
}