M
Mark
I have an aspx page that contains a usercontrol. The usercontrol is titled
'authorize'. 'authorize' contains 2 panel 'login' and 'logout'. Both are by
default 'not visible'
I want to set one of them, dependingn on whether the user IsAutheticated
(forms), to visible.
Whe I put the following code in my aspx page:
Sub Page_Load
If User.Identity.IsAuthenticated Then
authorize.pnlLogin.Visible = False
authorize.pnlLogout.Visible = True
Else
authorize.pnlLogin.Visible = True
authorize.pnlLogout.Visible = False
End If
End Sub
I get an error about being 'private'.
If I place the same code in my usercontrol, the error is 'user' is not
declared. (without the 'authorize' before the pnlLogin/Logout of course)
How can I accomplish this?
'authorize'. 'authorize' contains 2 panel 'login' and 'logout'. Both are by
default 'not visible'
I want to set one of them, dependingn on whether the user IsAutheticated
(forms), to visible.
Whe I put the following code in my aspx page:
Sub Page_Load
If User.Identity.IsAuthenticated Then
authorize.pnlLogin.Visible = False
authorize.pnlLogout.Visible = True
Else
authorize.pnlLogin.Visible = True
authorize.pnlLogout.Visible = False
End If
End Sub
I get an error about being 'private'.
If I place the same code in my usercontrol, the error is 'user' is not
declared. (without the 'authorize' before the pnlLogin/Logout of course)
How can I accomplish this?