Problem with session variable, not reflecting the value

Posted by Community Admin on 04-Aug-2018 13:46

Problem with session variable, not reflecting the value

All Replies

Posted by Community Admin on 20-Jul-2011 00:00

We have certain User Controls in our Project, we are using sessions to pass values from one page to another. There is one Logout control  which Clears all the session used in the Project like: Session.Clear();Session.Abandon() but after Login again to the Project even by using different LoginId, Sometimes Session values does not reflect it use the previous values.

Posted by Community Admin on 25-Jul-2011 00:00

Hi Ankit,

Can you try and use the following code at the end of the Page_Load method:

HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoServerCaching();
HttpContext.Current.Response.Cache.SetNoStore();

Kind regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 25-Jul-2011 00:00

Hi Victor Velev,

Thanks a lot for your response, these line of code really solve our Problem with session.

Thanks and Regards
Ankit Rastogi

This thread is closed