ASP Session Variables vs. ASP.NET Session variables

Last post 11-12-2009 4:47 PM by dotnetkode. 5 replies.

Sort Posts:

  • ASP Session Variables vs. ASP.NET Session variables

    11-11-2009, 11:40 AM
    • Member
      72 point Member
    • daveh551
    • Member since 02-23-2008, 3:38 AM
    • Posts 78

    Okay, it’s an established fact that the Session object in ASP has no relation to the Session object in ASP.NET.

     

    My question is this: If I have an ASP page, and it calls an ASPX page, which then does a Response.Redirect to another (or the same) ASP page, will the Session variables from the original ASP page be preserved in the final ASP page?  Does anybody know the answer, or do I need to experiment and see?


    Filed under: , ,
  • Re: ASP Session Variables vs. ASP.NET Session variables

    11-11-2009, 11:48 AM
    • All-Star
      25,869 point All-Star
    • qwe123kids
    • Member since 03-27-2008, 5:49 AM
    • Mumbai
    • Posts 4,398

    Hi,

    U may use Database.. or We WebRequest and WebResponse..

    http://comindotnet.blogspot.com/2009/03/sharing-session-and-cookies-in-com.html

    chk the above link

    Thanks
    Avinash Tiwari

    Remember to click “Mark as Answer” on the post, if it helps you.

    MY Blog

    Hacking Inside .net exe
  • Re: ASP Session Variables vs. ASP.NET Session variables

    11-11-2009, 11:51 AM
    • All-Star
      25,266 point All-Star
    • budugu
    • Member since 01-12-2006, 2:15 PM
    • North Carolina
    • Posts 3,773

    daveh551:
    My question is this: If I have an ASP page, and it calls an ASPX page, which then does a Response.Redirect to another (or the same) ASP page, will the Session variables from the original ASP page be preserved in the final ASP page?  Does anybody know the answer,
     

    Yes, you can do that. Refer this..

     

    Vijay Kodali || My Blog


    "Don't be afraid to be wrong; otherwise you'll never be right."
  • Re: ASP Session Variables vs. ASP.NET Session variables

    11-11-2009, 9:12 PM
    • Member
      72 point Member
    • daveh551
    • Member since 02-23-2008, 3:38 AM
    • Posts 78

    Thanks to both of you for responding, but that's not the question I'm asking.  I know there are several ways to pass Session variables between ASP and ASP.NET, but that's not what I'm trying to do. I just want to know if the ASP Session variables will still be there when I navigate back to the ASP page after having been in an ASPX page.  If possible, I don't want to have to do anything or rewrite any of the 100 or so existing ASP pages to make that happen.

    I did receive one affirmative answer on StackOverflow, so I think I'm okay.


  • Re: ASP Session Variables vs. ASP.NET Session variables

    11-12-2009, 6:06 AM
    Answer
    • Contributor
      5,226 point Contributor
    • RickNZ
    • Member since 01-01-2009, 8:43 AM
    • Nelson, New Zealand
    • Posts 865

    As long as the intermediate .aspx page doesn't delete or modify the ASP session cookie (which it won't unless you're doing so intentionally), then you will be fine.  All session data is connected to the the session ID, which is stored in that cookie.

    Also, cookie sharing/changing/deleting from one app to another can only happen if the apps are using the same cookie domains...



  • Re: ASP Session Variables vs. ASP.NET Session variables

    11-12-2009, 4:47 PM
    • Participant
      766 point Participant
    • dotnetkode
    • Member since 01-22-2008, 4:47 PM
    • Herndon, VA
    • Posts 125

    Yes the variables will be there in session until the session expires (this could happen if the session timed out, in your case if you did not make another .asp request in the specified timeout interval)

    ~ Remember To Mark The Posts Which Helped You As The ANSWER ~
Page 1 of 1 (6 items)