session variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • saikatkolkata
    New Member
    • Jan 2008
    • 17

    session variable

    how to use a session variable...simp le explanation..
    it wil b vry kind of u..
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello saikatkolkata,

    There are various types of containers that can be used in asp development. Application, Session, cookie, and local page are the common types of containers that we use to store variables.

    The essential difference between Application containers and the other containers is that Application containers are explicit to your site. Application containers are shared between all visitors. Session, cookie, and local page containers are specific to each visitor to your site. Application containers are declared in the Global.asa file of your website and all others are within the pages of your website.

    Application variable Usage:
    • Application("Va r1") = “Hello World.”
    • Response.Write( Application("Va r1"))


    Session variable Usage:
    • Session("Var2") = “How Are you?.”
    • Response.Write( Session("Var2") )


    Cookie Usage:
    • Response.Cookie s("Var3") = “Good, Thanks.”
    • Response.Write( Request.Cookies ("Var3"))


    Local page variable Usage:
    • Var4= “Cool”
    • Response.Write( Var4)



    Hope that helps~

    Comment

    • saikatkolkata
      New Member
      • Jan 2008
      • 17

      #3
      Originally posted by CroCrew
      Hello saikatkolkata,

      There are various types of containers that can be used in asp development. Application, Session, cookie, and local page are the common types of containers that we use to store variables.

      The essential difference between Application containers and the other containers is that Application containers are explicit to your site. Application containers are shared between all visitors. Session, cookie, and local page containers are specific to each visitor to your site. Application containers are declared in the Global.asa file of your website and all others are within the pages of your website.

      Application variable Usage:
      • Application("Va r1") = “Hello World.”
      • Response.Write( Application("Va r1"))


      Session variable Usage:
      • Session("Var2") = “How Are you?.”
      • Response.Write( Session("Var2") )


      Cookie Usage:
      • Response.Cookie s("Var3") = “Good, Thanks.”
      • Response.Write( Request.Cookies ("Var3"))


      Local page variable Usage:
      • Var4= “Cool”
      • Response.Write( Var4)



      Hope that helps~
      thankzz...CroCr ew. m very thankful for ur help.wil contact u in future for any other prob.hope u dont mind..

      Comment

      Working...