Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Close window?

Close window?

Scheduled Pinned Locked Moved ASP.NET
databasehelptutorialquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Karthick_gc
    wrote on last edited by
    #1

    Hi friends, Here i explain the requirments. If a user login he is activated in current members. If he logout using the logout button, he is deactivated. I did it using the database. But the problem is if the user straightly closes the Browser window, his name was not deactivated in the database. Can anyone tell how to solve the problem ??

    S 1 Reply Last reply
    0
    • K Karthick_gc

      Hi friends, Here i explain the requirments. If a user login he is activated in current members. If he logout using the logout button, he is deactivated. I did it using the database. But the problem is if the user straightly closes the Browser window, his name was not deactivated in the database. Can anyone tell how to solve the problem ??

      S Offline
      S Offline
      SeMartens
      wrote on last edited by
      #2

      Work with timeouts. As every user has its own session, you can catch the session-timeout-event. When this event fires you know that the user didn't take an action during the last xx minutes. Deactivate the user in your database according to this event. Regards Sebastian P.S.: A handler for this event can be found in Global.asax.

      It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

      K 1 Reply Last reply
      0
      • S SeMartens

        Work with timeouts. As every user has its own session, you can catch the session-timeout-event. When this event fires you know that the user didn't take an action during the last xx minutes. Deactivate the user in your database according to this event. Regards Sebastian P.S.: A handler for this event can be found in Global.asax.

        It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

        K Offline
        K Offline
        Karthick_gc
        wrote on last edited by
        #3

        Cant understand. Can u explain briefly?

        C S 2 Replies Last reply
        0
        • K Karthick_gc

          Cant understand. Can u explain briefly?

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          It means you're probably not clever enough to be attempting this task. Which part of the clear explanation you were given used terms you're not able to comprehend ? There is a better way, but it's also more complex, so there's probably no sense in trying to explain it.

          Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

          1 Reply Last reply
          0
          • K Karthick_gc

            Cant understand. Can u explain briefly?

            S Offline
            S Offline
            SeMartens
            wrote on last edited by
            #5

            Do the following: 1) Open the Global.asax-file of your ASP.NET project 2) Go to the method void Session_End(object sender, EventArgs e) ... 3) Call the method you are using to deactivate the user (if he clicks at the logout-button) within session_end @Christian Graus: I'm interested in the better way to do this you mentioned. How does it work? Regards Sebastian

            It's not a bug, it's a feature! Check out my CodeProject article Permission-by-aspect. Me in Softwareland.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups