gi11ies
Programmer
- Mar 26, 2002
- 52
This may seem pretty simple, but I just cant get my head around it! I have two different navigation bars, where the code for each is in seperate user controls.
I want a different navigation bar displayed depending on the state of a variable - is this case it is if the login state variable I have declared is true.
After the user controls are declared and called.
The code I use is as follows:
Sub Page_Load(S As Object, E As EventArgs)
Dim logState as Boolean = True (set to true for testing)
If logState = True
Response.Write("<Nav:SignIn runat='server'/>")
Else
Response.Write("<Nav:SignOut runat='server'/>")
End If
End Sub
If anyone can tell me what I am doing wrong of suggest another method? it would be great!
I want a different navigation bar displayed depending on the state of a variable - is this case it is if the login state variable I have declared is true.
After the user controls are declared and called.
The code I use is as follows:
Sub Page_Load(S As Object, E As EventArgs)
Dim logState as Boolean = True (set to true for testing)
If logState = True
Response.Write("<Nav:SignIn runat='server'/>")
Else
Response.Write("<Nav:SignOut runat='server'/>")
End If
End Sub
If anyone can tell me what I am doing wrong of suggest another method? it would be great!