Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

208
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda