Clicking back button on browser loses session information


Hi
I have had several scenarios where a user has pressed the back button and the information in a session has been lost. 
Has anyone else experienced this?
How do I get around this?

Rob

"Man is the best computer…and the only one that can be mass produced with unskilled labour”
-1
Elmbrook
5/5/2009 2:50:44 AM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 6 followers.

💬 7 Replies
👁️‍🗨️ 4700 Views



Explain a bit more what happens. Do you logout? or Session variables are null?
 


            
MAK Mark as Answer if this reply helps you
MVP ASP/ASP.Net ASP.Net Hosting : Host Depot My Site : ASPSnippets
1
mudassarkhan
5/5/2009 5:23:15 AM
If the user clicks the back button it won't clear the session.  What you may be experiencing is if the user sits on the page for an extended period of time, the session may have timed out.


Sincerely,
Malcolm Sheridan
Microsoft Certified Solution Developer
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
1
malcolms
5/5/2009 5:30:50 AM

 What you have right in you page which is called in back button

Thanks
Pankaj Gohel

Please Mark as Answer if you find the post useful.
1
pankajgohel
5/5/2009 5:35:08 AM

I have a wizard which has 5 steps. At step 5 all the information that is saved in a session gets saved to a database.
Sometimes and I can't reproduce it when a user gets to the final step the information that was stored to a session in previous steps (You can't go to the next step unless all information is filled in) is not there anymore and the user gets taken back to normally the first step because all the information in a session has disappeared.
Does that make sense?
It maybe a timing session, but the session has 15 minutes.
Any clues?

Rob

"Man is the best computer…and the only one that can be mass produced with unskilled labour”
-1
Elmbrook
5/5/2009 5:42:06 AM

 add this in ur page..
<%@ OutputCache VaryByParam="None" Duration="120"%>
i hope u re looking for cache..
go through this
http://www.asp.net/learn/videos/video-451.aspx
1
anup1252000
5/5/2009 5:50:57 AM

It may be a timeout issue.  Users may sit on the page for longer than 15 minutes. 
Another avenue to check is if you're using an Application pool in IIS, that could be recycling itself and cause the session to be cleared.

Sincerely,
Malcolm Sheridan
Microsoft Certified Solution Developer
Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as
Answer" if a marked post does not actually answer your question.
1
malcolms
5/5/2009 6:02:56 AM

Increase the session time and check if you have somehow disabled the ViewState property.

Bind GridView to Dynamically created DataTable | Bind DataTable to DropDownList

My Blog
1
shahed
5/5/2009 6:15:33 AM
Reply: