Q: back and a button click does not fire page_load

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have two apsx pages, and I set a session variable in asp1 and click to a
button to go to aspx2. In aspx2, I use this session variable in the query and
show data on the datagrid. I do this in the page) load without any post back
check. My problem is: each time I click button and go to aspx2, it is always
previous data shown in the data grid (as if cash is brought and query is not
performed), when I click refresh in the internet explorer, right data is
shown. It seems to me page_load is aspx2 is not launched again if I click
back in IE and click my button again to come back to aspx2. What is
problem/solution?
Thanks,
Jim.
 
Hi Jim,
I had seen this this isssue happening on my machine as well during one of
the project.

Can you double check the IE properties
Goto IE options on General tab ,
Select Temporary internet Files group and click on Settings.. button.
Settings dialog box will open make sure that, you have selected radio button
for Check for newer versions of stored pages:
Every visit to the page.

For me , after selecting this radio button resolved the issue.

Harish


Internet
 
This will ensure the page doesn't get cached, which seems to be your
problem.

Response.Expires = 0
Response.Cache.SetNoStore()
Response.AppendHeader("Pragma", "no-cache")
 
Back
Top