Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
Some C# session variables lost after javascript redirect

I have a c# asp.net page that runs inside a frame. This page sets some session variables and then redirects to a new .aspx page which calls some JS to jump the site out of the frame.

So it's something like:

Page1.aspx: Set Session["xyz"]="123" -> Response.Redirect("Page2.aspx", false) -> Page2.aspx: <script>top.location = 'Page3.aspx'</script>

When Page3.aspx loads, the variables I set on Page1 have a value of null. I can see at Page2, before the js does the redirect, that the variables still have their value.

On Page3, any variables that were set prior to Page1 loading also still have their values. There is nowhere in the code where the values are explicitly getting set to null.

I hope I've explained that well enough but I really have no idea what is going on and can't seem to find an answer anywhere. Any help gratefully received! Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!