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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top