Triggering event when member returns

Posted on 2012-09-20
Last Modified: 2012-09-22
I know I can detect when a person logs in via username/password but how can I detect when a person returns to the site (any page on the site) when they've checked the "remember me" box?  I need to fire an event or something so that I can do some stuff one time when a person comes to the site and is logged in.

Any ideas?
Question by:jglazer63
    LVL 83

    Expert Comment

    You need to check the URLReferrer on the Request object to see if its empty and check the Cookies collection.

    Author Comment

    Can you expand on this a little?
    LVL 83

    Accepted Solution

    If you check Request.URLReferer, it would contain URL of previous page. If its empty, it means user directly came to your site. If user was able to access the page directly without going to login page then it could indicate that cookie is used for authentication.

    Author Closing Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now