Last post Aug 02, 2007 08:50 PM by MikeHunt
Jul 31, 2007 06:44 AM|MikeHunt|LINK
Inside of an httphandler I am using, I need to access a session variable. This is working fine. However, on some pages there is a control which resets the session variable in a click event. However, I need this value in the httphandler code. What's happening
is it is one click behind, in that you have to click the button twice for the httphandler to pick it up. I guess this is because the click is a postback and not a new request. Anyway to get around this without using a response.redirect?
Aug 01, 2007 09:52 PM|rstrahl|LINK
Are you implementing IRequiresSessionState on your handler?
Without this there will be no session state available to your handler.
There should be no issue 'sharing' session state between page and handler - it's all going agains the same store.
+++ Rick ---
Aug 02, 2007 06:25 AM|MikeHunt|LINK
Yes I am, and I do indeed have access to session state. However, the issue is that I have a user control which has a click event on a button. Inside the click event I am resetting the session variable. After postback, the session value is still set to the
old value. If I refresh the page, or cause another postback then the new session value is set. If I remove the httphandler everything works as expected. Not sure why this is happening.
Aug 02, 2007 08:50 PM|MikeHunt|LINK
Anyone? Really stuck on this one.