Page Load Twice?

A

Adam Knight

Hi all,

I have the following code in a User Control.
For some reason it appears as if the page load function is executed twice as
the 'UserLoggedIn' function
results are being outputted twice.

If this is the case, i suspect it is something i have missed about a pages
life cycle.
Can anyone point in the right direction???

Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles MyBase.Load

'variable declaration
Dim Security As New myObj.Security()

'determine if user is logged in
If (Context.User.Identity.IsAuthenticated) Then

'build navigation if not already built
If Not (blnNavigationBuilt) Then

If(Security.IsDirector() Or Security.IsAdmin()) Then

BuildAdminNavigation()

End If

'display user logged in message
UserLoggedIn()

End If

End If

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,078
Latest member
MakersCBDBlood

Latest Threads

Top