Last post May 07, 2018 12:45 PM by uid284235
Member
3 Points
59 Posts
May 05, 2018 08:07 AM|uid284235|LINK
I used session variable to store some value in ASP web page. I found that for some of my clients(1%), session variable was cleared during post back.
What might be the reason for session variable to clear? Is there a way to avoid it?
Sample code:
If Page.IsPostBack = False Then Session("poststring") = "test string" Else TestVariable = Session("poststring") End If
All-Star
48740 Points
18195 Posts
May 05, 2018 08:14 AM|PatriceSc|LINK
Hi,
More likely they disabled even non persistent cookies ?
If you can you could use the session as a cache and reload data as needed. If it is absoluty required you could test for this and show some message.
May 07, 2018 12:45 PM|uid284235|LINK
PatriceSc Hi, More likely they disabled even non persistent cookies ? If you can you could use the session as a cache and reload data as needed. If it is absoluty required you could test for this and show some message.
Thank you for the reply. My client had his cookie disabled in the browser.
Member
3 Points
59 Posts
Session variable cleared in ASP.NET web page
May 05, 2018 08:07 AM|uid284235|LINK
I used session variable to store some value in ASP web page. I found that for some of my clients(1%), session variable was cleared during post back.
What might be the reason for session variable to clear? Is there a way to avoid it?
Sample code:
All-Star
48740 Points
18195 Posts
Re: Session variable cleared in ASP.NET web page
May 05, 2018 08:14 AM|PatriceSc|LINK
Hi,
More likely they disabled even non persistent cookies ?
If you can you could use the session as a cache and reload data as needed. If it is absoluty required you could test for this and show some message.
Member
3 Points
59 Posts
Re: Session variable cleared in ASP.NET web page
May 07, 2018 12:45 PM|uid284235|LINK
Thank you for the reply. My client had his cookie disabled in the browser.