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. Is it possible to create groups in session?

Is it possible to create groups in session?

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 2 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.
  • O Offline
    O Offline
    oceanexplorer
    wrote on last edited by
    #1

    Hi, I was wondering is there a way to create groups in session. so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group, but leave all others intact? Regards Paul Custance

    N 1 Reply Last reply
    0
    • O oceanexplorer

      Hi, I was wondering is there a way to create groups in session. so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group, but leave all others intact? Regards Paul Custance

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      oceanexplorer wrote:

      is there a way to create groups in session

      Upto my knowledge NO.

      oceanexplorer wrote:

      so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group,

      You can do this using Arraylist or any other memory storage. So each of your section values are filled into ArrayList and store arraylist object to session. To remove a particular section data, simply do Session.Remove(your section name). So arraylist object contained in the specified location will be removed and others will still exist in the session.


      My Website | Ask smart questions

      O 1 Reply Last reply
      0
      • N N a v a n e e t h

        oceanexplorer wrote:

        is there a way to create groups in session

        Upto my knowledge NO.

        oceanexplorer wrote:

        so that if I needed to clear down session variables pertaining to a particualr section of our application, I could call Sesswion.Clear on that group,

        You can do this using Arraylist or any other memory storage. So each of your section values are filled into ArrayList and store arraylist object to session. To remove a particular section data, simply do Session.Remove(your section name). So arraylist object contained in the specified location will be removed and others will still exist in the session.


        My Website | Ask smart questions

        O Offline
        O Offline
        oceanexplorer
        wrote on last edited by
        #3

        Thanks for your help, much appreciated. I have decided to implement a Dictionary in order to create groups in session. Regards Paul

        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