Session variable is lost between ASP & ASP.NET pages

Discussion in 'ASP .Net' started by =?Utf-8?B?Z2xlbm4=?=, Mar 28, 2006.

  1. Hi folks,

    I must be missing something here. I have an ASP page that I create a
    Session variable in as follows.

    Session ("name")="Joe"

    In an ASP.NET page in the same project and the same session, I call the
    Session variable as follows:

    Dim str As String
    str = Session("name")

    When I do a Response.Write (str), nothing writes to the screen.

    Any thoughts on what is happening here would be appreciated
     
    =?Utf-8?B?Z2xlbm4=?=, Mar 28, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?Z2xlbm4=?=

    sloan Guest

    Uhhhh....

    Yeah , that is what it will do. It doesn't work like that.

    You can check this out
    http://www.asp101.com/articles/sidney/sharingsessionstate/default.asp

    but .... the thing surprising you, isn't surprising at all. They are
    different technologies...
    with nothing but the phrase "asp" in common.




    "glenn" <> wrote in message
    news:...
    > Hi folks,
    >
    > I must be missing something here. I have an ASP page that I create a
    > Session variable in as follows.
    >
    > Session ("name")="Joe"
    >
    > In an ASP.NET page in the same project and the same session, I call the
    > Session variable as follows:
    >
    > Dim str As String
    > str = Session("name")
    >
    > When I do a Response.Write (str), nothing writes to the screen.
    >
    > Any thoughts on what is happening here would be appreciated
     
    sloan, Mar 28, 2006
    #2
    1. Advertising

  3. re:
    >nothing but the phrase "asp" in common


    Absolutely...

    The seminal work on sharing session state between ASP and ASP.NET is :

    "How to Share Session State Between Classic ASP and ASP.NET"
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp




    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en espaƱol : http://asp.net.do/foros/
    ===================================
    "sloan" <> wrote in message news:%...
    >
    > Uhhhh....
    >
    > Yeah , that is what it will do. It doesn't work like that.
    >
    > You can check this out
    > http://www.asp101.com/articles/sidney/sharingsessionstate/default.asp
    >
    > but .... the thing surprising you, isn't surprising at all. They are
    > different technologies...with nothing but the phrase "asp" in common.
    >
    >
    >
    >
    > "glenn" <> wrote in message
    > news:...
    >> Hi folks,
    >>
    >> I must be missing something here. I have an ASP page that I create a
    >> Session variable in as follows.
    >>
    >> Session ("name")="Joe"
    >>
    >> In an ASP.NET page in the same project and the same session, I call the
    >> Session variable as follows:
    >>
    >> Dim str As String
    >> str = Session("name")
    >>
    >> When I do a Response.Write (str), nothing writes to the screen.
    >>
    >> Any thoughts on what is happening here would be appreciated

    >
    >
     
    Juan T. Llibre, Mar 28, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marc Rivait

    Session variable lost between pages

    Marc Rivait, Nov 4, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    7,437
    Marc Rivait
    Nov 5, 2003
  2. gupta
    Replies:
    1
    Views:
    690
  3. Malek
    Replies:
    1
    Views:
    324
  4. Jazzis
    Replies:
    2
    Views:
    280
    Jazzis
    Sep 23, 2003
  5. Adam

    Session variables lost across pages

    Adam, Apr 26, 2004, in forum: ASP General
    Replies:
    8
    Views:
    820
Loading...

Share This Page