Q: back and a button click does not fire page_load

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.
 
G

Guest

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
 
S

Steve C. Orr [MVP, MCSD]

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top