How do I retrieve a session variable across an application ?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How do I retrieve a session variable across an application ?

  1. #1
    Hari Guest

    How do I retrieve a session variable across an application ?


    Hi,

    I am storing User Name in a session variable. As a admin feature, I would
    like to provide a screen where Administrator can see all the currently active
    sessions & user name. How do I retrieve a session variable across an application
    ?

    thanks for your help
    Hari

  2. #2
    Russell Jones Guest

    Re: How do I retrieve a session variable across an application ?

    You can do this by creating an array and storing it at Application scope.
    Add an entry during the Session_OnStart and remove it during the
    Session_OnEnd events in the global.asa file. Be sure to lock and unlock the
    Application object when you're adding or removing items. Alternatively (and
    much more flexible) create a FreeThreadedDOMDocument object on the server
    and use DOM methods to add and remove the items. The advantage of this
    approach is that it's easier to modify, save, and display the data using DOM
    methods and XSLT.

    Russell Jones
    Sr. Web Development Editor,
    DevX.com


    Russell Jones
    Sr. Web Development Editor
    DevX.com
    "Hari" <haris1@avaya.com> wrote in message news:3b40d3ba$1@news.devx.com...
    >
    > Hi,
    >
    > I am storing User Name in a session variable. As a admin feature, I would
    > like to provide a screen where Administrator can see all the currently

    active
    > sessions & user name. How do I retrieve a session variable across an

    application
    > ?
    >
    > thanks for your help
    > Hari




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center