473,397 Members | 2,028 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Page seems to be remembering HttpSessionState

I have a page that determines some of what to display based on
HttpSessionState. When I go to it the first time, it displays everything the
way I would expect. Then I go to another page on my site (by clicking links,
so I am still using the same browser window), which calls Session.Abandon()
to start a new Session. Then when I click a link to go to the page that uses
the HttpSessionState, it still uses the values that were in it when I left.
If I then click the browser's Refresh button, it uses the values from the
new Session. What do I need to do to make the user not need to click the
Refresh button? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/
Jan 15 '07 #1
2 1239
It's the browser issue.. ensure that the caching is turned off.

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------
"Nathan Sokalski" <nj********@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>I have a page that determines some of what to display based on
HttpSessionState. When I go to it the first time, it displays everything
the way I would expect. Then I go to another page on my site (by clicking
links, so I am still using the same browser window), which calls
Session.Abandon() to start a new Session. Then when I click a link to go to
the page that uses the HttpSessionState, it still uses the values that were
in it when I left. If I then click the browser's Refresh button, it uses
the values from the new Session. What do I need to do to make the user not
need to click the Refresh button? Thanks.
--
Nathan Sokalski
nj********@hotmail.com
http://www.nathansokalski.com/

Jan 15 '07 #2
Thus wrote Nathan,
I have a page that determines some of what to display based on
HttpSessionState. When I go to it the first time, it displays
everything the way I would expect. Then I go to another page on my
site (by clicking links, so I am still using the same browser window),
which calls Session.Abandon() to start a new Session. Then when I
click a link to go to the page that uses the HttpSessionState, it
still uses the values that were in it when I left. If I then click the
browser's Refresh button, it uses the values from the new Session.
What do I need to do to make the user not need to click the Refresh
button? Thanks.
Mark the page uncacheable. Either set the page direction <%@ OutputCache
Location="None" %or call Response.Cache.SetCacheability(HttpCacheability.No Cache).

Cheers,
--
Joerg Jooss
ne********@joergjooss.de
Jan 19 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: | last post by:
Please help. After a number of wrong turns and experiments I need advice on login management system to secure our web pages without inconveniencing our visitors or our internal staff. What I...
1
by: Steve | last post by:
Is there a property or method that I can check to see if a HttpSessionState has already timed out or not? I know that the HttpSessionState.Timeout property gives you the length of the session...
2
by: Nad | last post by:
Good day, I have a question about the Page.Session property used in ASP.NET This property is defined as follows: public virtual HttpSessionState Session {get;} and HttpSessionState is a...
5
by: Dan | last post by:
We have a simple site. It's a frameset with two frames a left and a right. The left frame is essentially a list of records from a database (using a server-side repeater control). When you click...
3
by: Peter Theill | last post by:
Hi, I'm trying to include the content of a request into an Xml document: if (System.Web.HttpContext.Current.Session != null) { XmlDocument d = new XmlDocument(); d.Load(new...
0
by: Chris Ericoli | last post by:
Hi, I am working with an 'in session' ado dataset with an asp.net application. My dataset is comprised of two tables, one of which maintains a few calculated datacolumns. For some reason these...
1
by: Scott | last post by:
I have a few questions about calling HttpSessionState.Abandon: 1) Does the session immediately go away or does it hang around and go away based on the session timeout rules? 2) What happens to...
6
by: Dee | last post by:
Hi The paging numbers of my DataGrid dont actually page. What can be the cause? Everyting else seems to work. Thanks Dee
2
by: Nathan Sokalski | last post by:
I have a page that determines some of what to display based on HttpSessionState. When I go to it the first time, it displays everything the way I would expect. Then I go to another page on my site...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.