G
Guest
I need to implement a login/logout feature (for a school assignment). I am using forms authentication. I have an index.html with frames: "top", "side", "main", "bottom". The top frame has a navigation bar with an asp hyperlink. I would like the text for this link to change from "Login" to "Logout" when the user logs in. So I put this code in the Page_Load of Top.aspx:
If User.Identity.IsAuthenticated Then
lnkLogin.Text = "Logout"
Else
lnkLogin.Text = "Login"
End If
In my Login.aspx.vb I have the following code in my btnLogin_Click:
RegisterStartupScript("Reload", "<SCRIPT Language='Javascript'>parent.top.document.Form1.submit()</" & "Script>").
The text for the hyperlink does NOT change when the user succesfully logs in. What am I doing wrong?
If anyone has a better way of accomplishing the same thing, if it's not too complicated , I would love to hear it!
Thank you,
Judy
If User.Identity.IsAuthenticated Then
lnkLogin.Text = "Logout"
Else
lnkLogin.Text = "Login"
End If
In my Login.aspx.vb I have the following code in my btnLogin_Click:
RegisterStartupScript("Reload", "<SCRIPT Language='Javascript'>parent.top.document.Form1.submit()</" & "Script>").
The text for the hyperlink does NOT change when the user succesfully logs in. What am I doing wrong?
If anyone has a better way of accomplishing the same thing, if it's not too complicated , I would love to hear it!
Thank you,
Judy