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. How i can undrestand a client user is exited from Web Application?

How i can undrestand a client user is exited from Web Application?

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestion
5 Posts 4 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.
  • S Offline
    S Offline
    Saba02
    wrote on last edited by
    #1

    Hi all, I want change a field in my database when a user leave whole of web application . How i can underestand that a user leave Web Application then i change my data base. I realy need your immediate help, Thank You

    Hoda

    C M S 3 Replies Last reply
    0
    • S Saba02

      Hi all, I want change a field in my database when a user leave whole of web application . How i can underestand that a user leave Web Application then i change my data base. I realy need your immediate help, Thank You

      Hoda

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

      Saba02 wrote:

      I realy need your immediate help,

      Of course you do. But, if you searched for this question, you'd find it's been asked many times before. There's no foolproof way to know, you can do some stuff with AJAX to try to make it foolproof, and that will work 99% of the time. If your app has users logging in, I'd just have a logout functionality, and a timeout so that if they don't log out, they get logged out after a reasonable amount of time. Otherwise, if you google, as I said, there's a client side event you can use to fire an ajax call telling you that they have left a page, then you can basically log them in and out, once for every page they visit.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • S Saba02

        Hi all, I want change a field in my database when a user leave whole of web application . How i can underestand that a user leave Web Application then i change my data base. I realy need your immediate help, Thank You

        Hoda

        M Offline
        M Offline
        Muhammad Gouda
        wrote on last edited by
        #3

        The only way is to use the session and store handle your database when the session expires But, I'd like to know what you need to store in database when the client exits

        foreach(Minute m in MyLife) myExperience++;

        C 1 Reply Last reply
        0
        • M Muhammad Gouda

          The only way is to use the session and store handle your database when the session expires But, I'd like to know what you need to store in database when the client exits

          foreach(Minute m in MyLife) myExperience++;

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

          Mohammed Gouda wrote:

          The only way is to use the session and store handle your database when the session expires

          That's not true, as I said, it's possible using AJAX to know when a client leaves a page, even if they do it by closing the browser.

          Christian Graus Driven to the arms of OSX by Vista.

          1 Reply Last reply
          0
          • S Saba02

            Hi all, I want change a field in my database when a user leave whole of web application . How i can underestand that a user leave Web Application then i change my data base. I realy need your immediate help, Thank You

            Hoda

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

            Take a look at global.asa(x) or maybe you can solve this with some javascript. ex body onUnload

            --------------- www.serverside.no

            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