views:

2

answers:

0

I have a loging control that is nested within a loginview. When I click the logout link, my method `

protected void LoginStatus1_LoggingOut(object sender, EventArgs e)
        {
            Guid guidUserId = AuthenticatedUser.LoginUserID;
            if (guidUserId != new Guid())
            {
                PortalDataContext db = new PortalDataContext(AuthenticatedUser.ConnectionString);
                var user = AuthenticatedUser.GetUser(guidUserId);
                if (user != null)
                {
                    user.LastActivityDate = user.LastActivityDate.AddMinutes(-16);

                    db.SubmitChanges();
                }
            }
        }

` is never called. I think it has something to do with the nesting of the control within a login view. How can I get around this so I can update the database? I need to reset the users last activity window to 16 minutes ago so I can tell if the user is still in the system and inactive or if they have logged out completely.