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. ASP.NET
  4. Passing Session State Variables from ASP to ASP.Net

Passing Session State Variables from ASP to ASP.Net

Scheduled Pinned Locked Moved ASP.NET
asp-netcsharp
5 Posts 3 Posters 1 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.
  • J Offline
    J Offline
    jpage
    wrote on last edited by
    #1

    I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.

    A D 3 Replies Last reply
    0
    • J jpage

      I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.

      A Offline
      A Offline
      Aravinthan 0
      wrote on last edited by
      #2

      Hi, As far as i know.. its not really doable.. but you can try to do some logic of storing the session value in a persistent storage and pass it to asp.net!


      Visit me:
      http://www2.domaindlx.com/earavi/
      When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
      mail me:
      aravinthan@rediffmail.com


      1 Reply Last reply
      0
      • J jpage

        I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.

        A Offline
        A Offline
        Aravinthan 0
        wrote on last edited by
        #3

        Hi, As far as i know.. its not really doable.. but you can try to do some logic of storing the session value in a persistent storage and pass it to asp.net! Store in a Database ! etc.. aravinthan.


        Visit me:
        http://www2.domaindlx.com/earavi/
        When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
        mail me:
        aravinthan@rediffmail.com


        J 1 Reply Last reply
        0
        • A Aravinthan 0

          Hi, As far as i know.. its not really doable.. but you can try to do some logic of storing the session value in a persistent storage and pass it to asp.net! Store in a Database ! etc.. aravinthan.


          Visit me:
          http://www2.domaindlx.com/earavi/
          When you know something.. its meant to share with others :-) for otherwise that knowledge has no worth:-)
          mail me:
          aravinthan@rediffmail.com


          J Offline
          J Offline
          jpage
          wrote on last edited by
          #4

          I actually came up with a simple work-around that works as long as you are not storing a large amount of data in session variables. On my ASP Classic login page, I added the following line of JavaScript: window.open('setsession.aspx?UserID=<%=Session("UserID")%>&CompanyID=<%=Session("CompanyID")%>&FullName=<%=Session("FullName")%>&LoggedIn=<%=Session("LoggedIn")%>') This passes my four session variables into an ASPX page named setsession.aspx. The code for this form simply assigns the .Net session state variables and then closes the form: Sub Page_Load Session("UserID") = Request("UserID") Session("CompanyID") = Request("CompanyID") Session("FullName") = Request("FullName") Session("LoggedIn") = Request("LoggedIn") End Sub SetSession.aspx

          window.close()

          1 Reply Last reply
          0
          • J jpage

            I am in the process of introducing ASP.Net pages into an existing ASP Classic Web Application. I can set and retrieve Session Variables within my ASP.Net web forms, but I cannot retrieve session variables created by ASP Classic pages. Can someone recommend a way to pass Session Variables such as Session("UserID") from ASP to ASP.Net.

            D Offline
            D Offline
            David Truxall
            wrote on last edited by
            #5

            Here is an offical take on your problem: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp

            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