Unload Bizarreness

M

Mike Labosh

I have a webform with this event procedure:

Private Sub Page_Unload( _
ByVal sender As Object, _
ByVal e As System.EventArgs _
) Handles MyBase.Unload

Logger.Logout(User.Identity.Name)

End Sub

Logger is my class that has methods for putting a username into a database
table when they login, and removing the entry when they log out.

So, in the implementation above, I want the code to log them out when they
surf off the page. But in stepping through it in the debugger, It's hitting
this event procedure when they *enter* the page, and does *not* hit it when
they *leave*

What gives?!?
 
A

Alvin Bruney [MVP - ASP.NET]

Is your unload event wired up correctly? Does it ever fire - in other words?
A correctly wired page unload event fires when the page unloads

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top