e.authenticate=true vs e.authenticate= false
Partial Class _Default
Inherits System.Web.UI.Page
Dim i As Integer
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
If Login1.UserName = "jack" AndAlso Login1.Password = "123" Then
Login1.Visible = "false"
label1.Text = "log in failed
e.Authenticated = "false"
Else
label1.Text = "logged in "
e.Authenticated = "true"
End If
End Sub
End Class
this is code for a single page ie login page
In the above code when the "If" condition is false ie
e.authenticated="true", the label on the login page doesnt show label text
"logged in" . But in case of when "If" condition is true ie
e.authenticated="false", the label on login page shows label text ie "log
in failed"
why authenticated="true" part doesnt show label text but
authenticated="false" part shows label text ??
No comments:
Post a Comment