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. Clearing the contents of session variables

Clearing the contents of session variables

Scheduled Pinned Locked Moved Web Development
tutorialquestion
3 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.
  • R Offline
    R Offline
    Rajiya
    wrote on last edited by
    #1

    I want to clear the contents of a specific session variables in ASP. Can anyone suggest me how to go about in doing this? It is very urgent. Thanks, Riz

    N G 2 Replies Last reply
    0
    • R Rajiya

      I want to clear the contents of a specific session variables in ASP. Can anyone suggest me how to go about in doing this? It is very urgent. Thanks, Riz

      N Offline
      N Offline
      Navi15
      wrote on last edited by
      #2

      Session["variablename"]=null; Navi

      1 Reply Last reply
      0
      • R Rajiya

        I want to clear the contents of a specific session variables in ASP. Can anyone suggest me how to go about in doing this? It is very urgent. Thanks, Riz

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        What exactly do you mean by "to clear" in this case? To clear a string, you can replace it by string.Empty or null. To clear a numeric value, you can replace it by a zero value. If you want to remove the key from the session variables collection, use the Session.Remove method.

        --- b { font-weight: normal; }

        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