N
Nathan Sokalski
I have an application that is using Session state. On one page, I use the
Session.Add() method to create the Key/Value pair for the first time. I am
then sent to another page using Response.Redirect(). On the page I am sent
to, I can view the Session's value using Session("mykey"), but it will not
let me remove or modify it. I have tried Session("mykey"),
Session.Remove("mykey"), Session.Clear(), and Session.Abandon(). None of
these seemed to make any change to Session (I have tried checking whether
Session("mykey") has a value using both Session("mykey")="" and
Session("mykey") Is Nothing). When I first go to the page that checks
whether Session("mykey") has a value before using Session.Add(), it does
recognize that is does not have a value. Also, when I tried calling
Session.Abandon() twice by clicking the Button that calls the method, it
seemed to work, but not if I call it twice one immediately after the other.
I have EnableSessionState="True" in the @Page and <pages
enableSessionState="true"> in my Web.config file. Does anybody have any idea
why I might be having this problem? Thanks.
Nathan Sokalski
(e-mail address removed)
http://www.nathansokalski.com/
Session.Add() method to create the Key/Value pair for the first time. I am
then sent to another page using Response.Redirect(). On the page I am sent
to, I can view the Session's value using Session("mykey"), but it will not
let me remove or modify it. I have tried Session("mykey"),
Session.Remove("mykey"), Session.Clear(), and Session.Abandon(). None of
these seemed to make any change to Session (I have tried checking whether
Session("mykey") has a value using both Session("mykey")="" and
Session("mykey") Is Nothing). When I first go to the page that checks
whether Session("mykey") has a value before using Session.Add(), it does
recognize that is does not have a value. Also, when I tried calling
Session.Abandon() twice by clicking the Button that calls the method, it
seemed to work, but not if I call it twice one immediately after the other.
I have EnableSessionState="True" in the @Page and <pages
enableSessionState="true"> in my Web.config file. Does anybody have any idea
why I might be having this problem? Thanks.
Nathan Sokalski
(e-mail address removed)
http://www.nathansokalski.com/