how can session variables take the user information

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RamyaSrinath
    New Member
    • Mar 2008
    • 7

    how can session variables take the user information

    please tell me that if a session variable is not initialised either in global.asa or anywhere else and has to take user information, how can this be possible?
    please explain me with code. I have same confusion with cookies also
  • idsanjeev
    New Member
    • Oct 2007
    • 241

    #2
    Originally posted by RamyaSrinath
    please tell me that if a session variable is not initialised either in global.asa or anywhere else and has to take user information, how can this be possible?
    please explain me with code. I have same confusion with cookies also
    Hi RamyaSrinath
    if Session variable is not initialised any where then how can it work that not make any sance if you want to use session or cookies then you have to initialised first.Session and cookies both are store varibales and transfred value one to anohter asp page .Dr. B has been reply on your previous question.

    The most important thing about the Session object is that you can store variables in it.

    When the value is stored in a session variable it can be reached from ANY page in the ASP application:

    Please Refer this link for more detail about session and cookies
    cookies and session

    Comment

    • RamyaSrinath
      New Member
      • Mar 2008
      • 7

      #3
      Originally posted by idsanjeev
      Hi RamyaSrinath
      if Session variable is not initialised any where then how can it work that not make any sance if you want to use session or cookies then you have to initialised first.Session and cookies both are store varibales and transfred value one to anohter asp page .Dr. B has been reply on your previous question.

      The most important thing about the Session object is that you can store variables in it.

      When the value is stored in a session variable it can be reached from ANY page in the ASP application:

      Please Refer this link for more detail about session and cookies
      cookies and session
      ya that is ok. but how can it take user information?

      Comment

      • idsanjeev
        New Member
        • Oct 2007
        • 241

        #4
        Originally posted by RamyaSrinath
        ya that is ok. but how can it take user information?
        Hi RamyaSrinath
        When user login then you have to store and retrive user detail in session or cookies like

        [CODE=asp]
        'store username in session
        Session("userna me") = Request.Form("u sername")
        'store username in cookies
        Response.Cookie s("username") = Request.Form("u sername")
        'retrive username from session
        Response.write (Session("usern ame"))
        'retrive username from cookies
        Response.write (Request.cookie s("username") )
        [/CODE]

        Comment

        • RamyaSrinath
          New Member
          • Mar 2008
          • 7

          #5
          Originally posted by idsanjeev
          Hi RamyaSrinath
          When user login then you have to store and retrive user detail in session or cookies like

          [CODE=asp]
          'store username in session
          Session("userna me") = Request.Form("u sername")
          'store username in cookies
          Response.Cookie s("username") = Request.Form("u sername")
          'retrive username from session
          Response.write (Session("usern ame"))
          'retrive username from cookies
          Response.write (Request.cookie s("username") )
          [/CODE]
          thank you. actually there was some problem when I tried for that . but even then dat is the right one.

          Comment

          • idsanjeev
            New Member
            • Oct 2007
            • 241

            #6
            Originally posted by RamyaSrinath
            thank you. actually there was some problem when I tried for that . but even then dat is the right one.

            Hi RamyaSrinath
            What is the problems let us know some body can help you out
            thanks
            jha

            Comment

            Working...